RubyFlow The Ruby and Rails community linklog

Should ruby go the haml route and uses significant whitespaces?

I just wrote a post about whether or not ruby should use significant whitespaces like python, haml and coffeescript.

Comments

No. And here’s why: it forces the programmer to pay attention to every individual line in stead of only to the end of the block.

I think programming languages should be designed according to what I call the “rule of least attention”. This rule simply is “the most convenient programming language is the one which needs the least attention to details”.

Now, having to write “end” to end a block is indeed a detail one has to pay attention to. But it’s a detail that occurs with much less frequency than indentation, which, if whitespace is significant, you have to pay attention to on /every single line/.

Computer says: “…Nooo….”

Now tell me how eval would work?

No! Haml is perfect for markup only. Because of all this </div>s. They looks messy. Although from a programming perscpective ruby syntax is more than awesome, it’s already simple and clear. If it goes for more simplicity it will breaks down clearance.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in