[erlang-questions] Abstract patterns, structs and frames

Richard Andrews bbmaj7@REDACTED
Tue Feb 24 03:56:34 CET 2009



> > I don't see a need for the tag (ie. struct) and I think it might be a problem 
> in some cases.
> 
> Having tried to convert some large chunks of Erlang from records
> to frames, I can say that it really helps a lot having a place to
> put the record name.  And when you have a function with two or
> more frame arguments, it can help you keep track of which is which.
> 
> I'm not yet convinced that tags are _essential_, but they are
> definitely too useful to forbid.

I agree whole-heartedly with an optional tag - but it should be a convention, in the same way that record names appear as the first element in a tuple. I woudl like to see a tagged frame syntax as a convenience; in the way records were added as a convenience for tuples.

eg. 
~tagName{} =:= <{''=tagName}> 
(or whatever the current syntax is imagined to be)

The OP stated structs *or* frames would be considered in an EEP. Can't we have both?


--
  Rich


      Make Yahoo!7 your homepage and win a trip to the Quiksilver Pro. Find out more



More information about the erlang-questions mailing list