[erlang-questions] some language changes

James Hague <>
Mon Jun 4 15:49:48 CEST 2007


Robert Virding wrote:
> Why is it less ugly. The problem is not whether the BEAM supports but if
> it fits and we want it. You could probably add a lot of stuff if go
> after what the BEAM supports.

I commonly see code like this, even in OTP:

{Hours, Rest1} = parse_integer(L),
Rest2 = parse_char(Rest1, $:),
{Minutes, Rest3} = parse_integer(Rest2),
etc.

The RestN variables are just hacks, IMO, and make the code hard to
read and maintain.  I know there are other ways of writing this code,
but this is the straightforward "Erlang way."

Remember, this wasn't a proposed change to Erlang proper--or even a
proposal  at all--but an example of something that could be done in an
Erlang-like language running on BEAM (the "Erlang Redux" idea that
Tobbe suggested).

James



More information about the erlang-questions mailing list