[erlang-questions] New module syntax and semantics?

Richard A. O'Keefe ok@REDACTED
Wed Jul 2 03:11:58 CEST 2008

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?

More information about the erlang-questions mailing list