Does Erlang have methods?
问题 E.g. is there something like this: O = widget:new(), O:whirl() I seem to recall seeing some code like this (maybe I was imagining it), but I haven't seen it in the tutorials that I've read. From what I've seen, the closest thing is this: O = widget:new(), widget:whirl(O) That's not too bad, but not having to repeat widget: in the second expression would be nice. 回答1: This is syntax for parametrized modules which was removed from Erlang in R16 (2012). 回答2: No, Erlang does not have methods.