I've seen module_name:new used in Erlang code, but there is no reference to a "new" function in the module_name module. What does "new" do?
Whoa!!! So is this basically saying that Erlang has classes after all?
Zubair
2010-02-17 19:05:57
Not quite like usual OOP you'll find though...
jldupont
2010-02-17 19:11:14
But they also say that this is not a standard part of Erlang? So maybe it will be removed?
Zubair
2010-02-17 19:11:15
This is nothing like classes. A parametrized module simply enables you to pass some parameters (common to most of the functions in the module) to functions without including them as arguments.Removing it involves more work than leaving it as it is; so my guess it will be not removed. If it is broken because of some other changes, it might not be fixed...
Zed
2010-02-17 23:13:20
Ok, so basically we shouldn't use them? It is just that I've seen them used extensively in many Erlang Open Source projects...
Zubair
2010-02-18 08:46:52
@Zubair: I guess it is a risk you need to manage...
jldupont
2010-02-18 11:19:55
Well its quite hard to manage, as I need to decide if I allow users to use them in a client API. Anyway, I've added another StackOverflow question regarding this, as if it gets removed then many Erlang products will break
Zubair
2010-02-18 11:53:07