From: David Masover Date: 2009-12-15T10:09:59+09:00 Subject: Re: Poll: Significant Indentation On Monday 14 December 2009 02:55:06 pm Seebs wrote: > On 2009-12-14, David Masover wrote: > > And again, _optional_ significant whitespace. Would you stop using Ruby > > if it became an option? > > I don't think it makes sense to describe it as optional. Why not? > If it's there, then the parser has to handle it for any modules which use > it. Which means I have to deal with at least some incoming code using it, > and that means I can no longer trust blocks to have end markers. So, by this logic, use (or lack) of parentheses are optional, as are curly brackets around hash literals (if they're immediately passed as the last argument to a method)... > You can talk about optional parentheses, because both in the pair are > optional and we know how to detect the argument list. With significant > whitespace, though... It seems like you'd have to know whether or not it > was in use in advance. That depends what the syntax looks like. One thing that was proposed was using a colon: def some_value: @some_value In the last discussion, Matz wasn't opposed to the idea, but he said the colon, specifically, wouldn't work. > But basically, I find significant whitespace a sufficiently high barrier > to reading and maintaining code that, if a noticeable chunk of Ruby code > were written that way, I would probably lose a lot of interest. I > frequently have to read and deal with other peoples' code to get things > done, and if that code were illegible to me, that would be a big downside. Do you really not find ways people can write unreadable code in Ruby as it is? If the problem is unreadable code, the solution is coding standards and comments. I don't feel it should be the job of the language to enforce coding standards, and that is one of the reasons I use Ruby in the first place. But this is more than I wanted to say, yet. Ultimately, it's a matter of taste, which is why I'm more interested in how many people want such a feature than how many people think it should exist. The biggest pain point for me is HTML generation, so if no one else cares, I'll just go use Haml.