有什么方法可以让 Erlang 忘记内置函数,以便我可以使用该名称?
例如。忘记找回
There's a bit of confusion here.
retrieve
is not a built-in function, you may be thinking of receive
receive
is not a built-in function, but a special token in the language, much like if
, case
, end
, and so on. These cannot be modified.erlang
module, and you cannot redefine this oneerlang
are auto-imported in modules and such. Any module-local definition will take over these, and otherwise they're syntactic shortcuts for erlang:MyBif(...)
.user_default
module. These will only work in the shell.-compile({no_auto_import,[Name/N]}).
module attribute, so that Name(...)
always uses the local function.