开发者

Erlang - Can a module name start with a capital letter?

开发者 https://www.devze.com 2023-01-30 18:06 出处:网络
Erlang Can a modul开发者_JS百科e name start with a capital letter?A module name is an atom, so it must normally start with a lowercase letter, unless you enclose it in single quotes. This is actually

Erlang Can a modul开发者_JS百科e name start with a capital letter?


A module name is an atom, so it must normally start with a lowercase letter, unless you enclose it in single quotes. This is actually possible:

%% in Foo.erl
-module('Foo').
...

%% in Erlang shell
1> 'Foo':foo().
"foo"

But completely horrible, so don't do this.

0

精彩评论

暂无评论...
验证码 换一张
取 消