5 ms·
The only reason I can think of why someone would look at the Ruby code and not be immediately sure that the 10 prints, is if they've become very accustomed to f
by brlewis 19y ago
The only reason I can think of why someone would look at the Ruby code and not be immediately sure that the 10 prints, is if they've become very accustomed to for loops like the one in the C++ example. It's conditioning, not intelligence, that makes the difference.
- aston 19y agoI think you missed part of my point, which is that "..." vs. ".." is a subtlety introduced by the mantra of high-density syntax seen in LFSP design. The 10 doesn't print, btw.
- brlewis 19y agoI don't think the ".." vs "..." level of density is universal in LFSP design. Macros in Lisp/Scheme are words. See the sql-repeat macro with group-beginning? and group-ending? for example. It makes things more transparent than your typical LFM implementation would: http://brl.codesimply.net/brl_4.html#SEC31 http://brl.codesimply.net/brl_4.html#SEC31
- jey 19y agoThen by your measure, is Perl the most-LFSP language out there? I think Perl reads like line noise. High-density syntax with clear, simple concepts is a desirable feature in a language. Assigning some function to every possible permutation of symbols (a la Perl) is just stupid. Ruby falls into the "just stupid" bin in this case.
- acgourley 19y agoI agree, the for loop is not intuitive at all, just historically present. However, try comparing the ruby against: for x in range(10): print x