[Prev][Next][Index][Thread]
Re: C# is not Dylan (was: Re: C# : The new language from M$)
"Neel Krishnaswami" <neelk@brick.cswv.com> wrote in message
slrn8m4n1e.h27.neelk@brick.cswv.com">news:slrn8m4n1e.h27.neelk@brick.cswv.com...
>> Unfortunately I find Scheme easily as unreadable as Lisp. As a
>> result, I have no tool available to evaluate the elegance of the
>> construct you posted. Can you do a line-by-line commentary (if you
>> have the time) to explain: a) how it works and b) what you find
>> powerful in it?
> Here it is, in Dylan and in Scheme. (I'll use factorial as the
> example).
[snip explanation]
> The big advantage to using this style of iteration is that it's
> extremely clear what is changing on each pass through the loop,
> because you explicitly pass all the changed state to the next
> iteration. Invariants become very easy to identify.
> The big disadvantage (which Tim Bradshaw alluded to) is that there's
> no requirement that you can advance to the next iteration step at any
> old point; you can literally call the advance function anywhere. This
> can occasionally obscure the control flow.
That sounds interesting. I'll have to explore this construct.
References: