new syntax - a provocation

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Tue Sep 23 08:25:58 CEST 2003


> The one single source, as far as I can tell, of nonlinear algorithms in
> Erlang, is an inability to directly address list elements (as per array
> subscripts, or similar).

Tuples can be used that way. One could imagine using SomeTuple{N} as shorthand
for element(N, SomeTuple). If dynamic size is needed, then resizing is somewhat
costly, but it is in C too.

> I'd also be inclined to vote for cleaner syntax; many things such as
> comprehensions are nice, I suppose, but offer no fundamental improvement
> in expressivity (since one could write the actual function out in any
> event).

For me, comprehensions are the cleaner syntax :) They have much more expressive
power, even if it's only syntactic sugar. The same applies to records: they only
simplify expressions and don't bring anything fundamentally new. But the new
level of abstraction is *very* useful anyway.

/Vlad



More information about the erlang-questions mailing list