9 ms·
I'm probably in the minority but I would love to see a dialect of ruby that has significant whitespace. Death to unnecessary 'end's
by semanticart 14y ago
I'm probably in the minority but I would love to see a dialect of ruby that has significant whitespace. Death to unnecessary 'end's
- vidarh 14y agoSignificant whitespace in Python was a significant factor in my decision to get proficient in Ruby over Python. Yes, I hate it that much, and I know quite a few Ruby devs with similar views...
- semanticart 14y agoHere's how I look at it: I indent my code properly and my team does the same. If we're already doing the right thing where whitespace is concerned, why not reap some benefits from it? Of course, I also use Coffeescript and Haml...
- jamesbritt 14y agoOf course, I also use Coffeescript and Haml... I'm curious: why not use Python then as well?
- chrismsnz 14y agoHe's saying that him and his team indent their code correctly anyway, so it might as well be significant
- jamesbritt 14y agoI'm asking if someone wants a language like Ruby but with significant white-space why not use Python?
- chrismsnz 14y agoI'm pretty sure his comment is indicating he _does_ use Python and that is his take on the "significant whitespace" issue.
- draegtun 14y agoFunny, I posted the following to HN this morning: Acme::Pythonic - Python whitespace conventions for Perl - http://news.ycombinator.com/item?id=5175619 http://news.ycombinator.com/item?id=5175619
- josh-j 14y ago> Some observers objected to Go's C-like block structure with braces, preferring the use of spaces for indentation, such as used in Python or Haskell [braces are optional in haskell]. However, we have had extensive experience tracking down build and test failures caused by cross-language builds where a Python snippet embedded in another language, for instance through a SWIG invocation, is subtly and invisibly broken by a change in the indentation of the surrounding code. Our position is therefore that, although spaces for indentation is nice for small programs, it doesn't scale well, and the bigger and more heterogeneous the code base, the more trouble it can cause. It is better to forgo convenience for safety and dependability, so Go has brace-bounded blocks. http://talks.golang.org/2012/splash.article http://talks.golang.org/2012/splash.article
- pacaro 14y agoThis. Especially when writing a code generator. Targeting a significant whitespace language is potentially more tricky than one with explicit delimiters. I love the Haskell approach to this.
- dbaupp 14y ago(For those who don't know, Haskell has an optional whitespace-significant syntax (which most humans use) as well as a brace-delimited syntax, and these are exactly equivalent.)