[erlang-questions] Extensions to comprehensions eeps
Thu Jul 31 09:59:27 CEST 2008
2008/7/31 Hynek Vychodil <vychodil.hynek@REDACTED>
> There is functional difference, between <- and <= is not functional
> There is not reason why
> [X || <<X>> <- <<"abc">> ].
> should not return same result as
> > [X || <<X>> <= <<"abc">> ].
I might be mistaken here, but I think the issue is that the compiler
generates completely different code for each case and when the generator
looks like X <- Y, i.e. the right side is not a constant, it has to know
which one to produce. The compiler can't guess from the source code, because
for example <<X>> <- L is a very normal list generator, one can't assume L
is a binary.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions