Why Ruby?
Adam D. Ruppe
destructionator at gmail.com
Sun Dec 12 09:03:06 PST 2010
foobar wrote:
> D basically re-writes foreach with opApply into the ruby version
which is why Ruby is *BETTER*
You missed the point: there is no "Ruby version". They are the
same thing.
> foreach to me is a redundant obfuscation
How can it be redundant? It's got the same elements the same
number of times.
rofl.copter.each |lol|
spam
end
foreach(lol; rofl.copter)
spam
Same elements, just reordered.
I don't know about the each() method itself. I've never written
one, but I suspect it is virtually identical to opApply too.
More information about the Digitalmars-d
mailing list