[erlang-questions] Parameterized module initialization
Zhemzhitsky Sergey
Sergey_Zhemzhitsky@REDACTED
Tue Jun 26 16:16:48 CEST 2012
Hi guys,
Thanks a lot for answers. I suppose I will not use any workarounds for now.
Best Regards,
Sergey
-----Original Message-----
From: Vlad Dumitrescu [mailto:vladdu55@REDACTED]
Sent: Tuesday, June 26, 2012 5:14 PM
To: Joe Armstrong
Cc: Zhemzhitsky Sergey; Erlang-Questions Questions
Subject: Re: [erlang-questions] Parameterized module initialization
Hi,
On Tue, Jun 26, 2012 at 2:53 PM, Joe Armstrong <erlang@REDACTED> wrote:
> There is an undocumented way of doing this (which one day will become
> standard) Suppose we define X as follows:
>> X = {mod1, a,b,c}.
> {mod1, a,b,c}.
> X is now an instance of a parameterised module. if we now call the
> function X:func1(x,y) then what actually gets called is the function
> mod1:func1(x,y,{mod1,a,b,c})
I hope that you are expressing some form of sarcasm, Joe.
If I may use such language, it is horrible. Just as we got (almost) rid of {M,F} to the benefit of proper function references, are we going to get another kludge? A proper module reference is the way to go here. Then there are plenty of nice things that can be supported in a clean way.
best regards,
Vlad
_______________________________________________________
The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia.
If you need assistance please contact our Contact Center (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp
More information about the erlang-questions
mailing list