Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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.


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


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.


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: