Erlang article #1 on programming.reddit.com
Fri Aug 18 11:00:55 CEST 2006
On 8/18/06, Christian S <chsu79@REDACTED> wrote:
> I'm in the camp that doesnt limit the meaning of "loop" to only be
> imperative code with destructive assignment. I think a recursive
> function is as much of a loop as anything else. I forget who, but
> havent someone clever in the ways of computer science proved that
> imperative and recursive code are equal in computability?
> It is the effect of having the same code being used repeatedly that is
> the important thing. My not so humble opinion though.
> I guess this thread only exists because people have slightly different
> definitions of "loop", and like others I feel that I have no immediate
> need or desire to change my idea of what "loop" means.
> So far I havent seen any "noob" ask to have erlang turn into a more
> imperative language. If they would do so, one can just point them to
> the existing languages in that category.
I would certainly agree with that sentiment. I definitely wouldn't say
that Erlang doesn't have "for loops", but that Erlang's syntax for
them is tail recursion or a list comprehension (or something that
reduces to that such as a lists:map or a lists:foldl, etc.).
More information about the erlang-questions