News for hackers. Stuff that matters.
Re:LFMs and LFSPs (Michael Vanier via PG) by brlewis on Monday July 09, 2007 @11:32AM (#33254)
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.
Re:LFMs and LFSPs (Michael Vanier via PG) by aston on Monday July 09, 2007 @11:45AM (#33256)
I 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.

Re:LFMs and LFSPs (Michael Vanier via PG) by brlewis on Monday July 09, 2007 @12:32PM (#33270)
I 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

Re:LFMs and LFSPs (Michael Vanier via PG) by jey on Monday July 09, 2007 @02:13PM (#33297)
Then 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.
Re:LFMs and LFSPs (Michael Vanier via PG) by acgourley on Monday July 09, 2007 @12:54PM (#33280)
I 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