[erlang-questions] per function/process locals

James Hague <>
Tue May 1 22:44:49 CEST 2007


> Speaking only for myself, I find that it is a rare algorithm where
> I need more than a handful of "variables" in a loop,

I actually do this quite a bit.  Sometimes problems have bunch of
related variables, but records are awkward.  Even just having 5 values
getting passed around and "updated" in a loop bugs me.  Editing that
kind of code feels like busy work.

I think the Erlangyest solution is to implement Joe's structs proposed
a few years ago, then have the compiler recognize situations where
structs are created and modified in a loop.

> I'd rather have the let-for-then construct.

Could you give an example?



More information about the erlang-questions mailing list