[erlang-questions] New module syntax and semantics?

Gleb Peregud gleber.p@REDACTED
Wed Jul 2 12:34:25 CEST 2008

On Wed, Jul 2, 2008 at 3:11 AM, Richard A. O'Keefe <ok@REDACTED> wrote:
> On 2 Jul 2008, at 8:59 am, Juan Jose Comellas wrote:
> -record(fs_channel_event, {..lots..,extra}).
> -record(fs_channel_answer_event, {..several..}).
> -record(fs_channel_hangup_event, {..several..}).
>> The code that receives the events is unnecessary cumbersome because
>> it needs to work with a record within a record. If this was
>> encapsulated within a parameterized module, it would become much
>> cleaner.
> I don't quite see how it would, unless, no, you _couldn't_
> be thinking of making a module instance for each channel?
> It's certainly not clear that so heavy a sledgehammer is
> needed for this nut.  Can you provide an example of the
> 'unnecessarily cumbersome code' so we can see if it can
> be clarified another way?

Is it so heavyweight? Aren't parametrized modules instances just a
tuples of type {Mod, Param1, Param2, ...}? Or is calling of functions
from such module too expensive?

> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions

Gleb Peregud

Every minute is to be grasped.
Time waits for nobody.
-- Inscription on a Zen Gong

More information about the erlang-questions mailing list