From: Michal Suchanek Date: 2009-12-16T03:09:55+09:00 Subject: Re: Poll: Significant Indentation 2009/12/15 Roger Pack : >> If Ruby had optional significant whitespace as a core language feature >> (maybe >> like http://gist.github.com/117694), would you use it: >>  - Never? >>  - Sometimes? >>  - All the time? >>  - Don't care? >>  - Only with different syntax (lazibi, colon, something else?) I'm not sure adding significant indentation is a good idea. The Ruby syntax is already so complex that most editors can't get all of it - some constructs simply don't indent right so I have to split them differently or indent them manually. Imagine adding significant indentation to that. I would probably use the feature it it just implicitly sprung to action the moment I forget some ends. However, it would probably make working with Ruby code harder. > > In general I'm in favor of optional significant whitespace, because it > fits more code onto the current viewable page. > > In general I think that whitespace delimited code is easier to read, but > harder to write. > > Does anybody have any experience as to whether that makes code easier to > maintain, or not? I think that there are already fine languages with significant indentation, and fine languages with syntax that does not heavily rely on whitespace, including Ruby. I would like to point out one trend that I noticed: the languages which do rely on significant indentation seem to have overall simpler syntax so that even in case of clobbered code it's somewhat easier to deduce what goes where though it's unambiguous only if you have some idea what the code does. Ruby has already gone the way of more complex syntax which is more concise at times but requires more explicit delimiters at others. Undoing that is a challenge which requires more than just adding significant indentation. There has to be a balance between the two features to keep the code readable and maintainable. Thanks Michal