[erlang-questions] Getting rid of some repetition.

Christian S chsu79@REDACTED
Mon Mar 17 22:27:21 CET 2008


2008/3/17 Colin Z <theczintheroc2007@REDACTED>:
> Is there a shorthand way to avoid having to repeat the calls to loop so many

Use a record. It makes it more clear what you change in the state,
e.g. with the "S#state{beer=primator}" syntax.

> Is there any reason why something like this wouldn't be possible?

I feel some resistance to addition of cosmetic syntax tricks that make
code easier to write at the cost of being harder to read.   If that
counts.



More information about the erlang-questions mailing list