From: David Masover Date: 2009-12-16T00:26:36+09:00 Subject: Re: Poll: Significant Indentation On Monday 14 December 2009 08:10:09 pm Seebs wrote: > For it to not be ambiguous, you have to know in advance which one you're > looking for. I agree. I don't think it has to be a special token at the start of a block, but definitely, some context which unambiguously marks this as an indented block, and which doesn't make existing blocks autoindented. If I were writing a new language, I'd much prefer something like endless.rb, where 'end' is simply optional, but as you point out, that would screw up existing code. So, very worst case, you'd specify it per-file or per-block. > > Do you really not find ways people can write unreadable code in Ruby as > > it is? > > Oh, sure. But the language is at least theoretically subject to > indentation fixers now. It wouldn't be with this change. Sure it would, they'd just be more complicated to write, and wouldn't apply universally. Also, indentation fixers are far from the only automated tools which could be applied -- I suspect there are some that already don't work because of syntax that's already flexible. > > 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. > > I suppose if we're talking about a special thing which introduces blocks, > part of my objection goes away -- it's no longer impossible. > > I still can't comprehend wanting that feature -- it's always struck me > as introducing a lot more prospective undiganosible errors than it > could ever remove. I'd argue that "undiagnosable" is a strong word, especially when we're talking about a language with a strong community ethic of testing and beautiful code. Again, I'd suggest that it's that code in particular, and not the syntax, which would make it unreadable. But my goal here isn't to get you to agree. I think at least you're no longer opposed to the feature existing, though you'd be opposed to the use of it. > (Disclaimer: I get a lot of mail that's been corrupted by a messaging > server which strips or squashes leading whitespace.) And I see the same thing happening in IM clients. But IM clients also tend to notice smileys and such, which can corrupt the code to unreadability long before indentation would, and don't always even make it possible to copy and paste it in its original format. There's no limit to the extent that bad tools can screw up code. The solution is to not use tools like that -- worst case, that's what pastie is for.