From: Joe Mason Date: 2004-01-09T19:26:40+09:00 Subject: Re: block delimiting In article <3FFE2A2E.5040604@po.cwru.edu>, Dan Doel wrote: > Jeremy Henty wrote: > Haskell doesn't require you use significant whitespace. You can write > Haskell with semicolons > and such (I don't quite recall the exact syntax). The significant > whitespace is shorthand for the > uglier semicolon/block-delimited syntax. > In other words, you aren't forced to use whitespace if it isn't handy, > but when it is, you can. This doesn't fix the big problem with meaningful indentation, which is that it makes it hard to cut and paste code from different levels without good editor support, and especially error-prone to cut-and-paste from the web. I caught one of the big names in Python posting some code to comp.lang.python once, all flush with the left margin. I forget exactly who it was - not Guido. But I figured if the language wizards couldn't get pasting 100% right, there wasn't much chance anybody would get through a Python career without having problems. Of course, with a language that used block delimiters, the code would be incredibly hard to read, but you can have a script go through and clean it up. In Python if your browser eats all the indentation, there's no way to reconstruct the proper logic. (I like {}'s myself - I find end keywords particularly ugly - but it's not a deal breaker for Ruby.) > Much like how in Ruby, the following things are equivalent: > > foo > bar > > and > > foo ; bar You can use "foo ; bar" in Python, too, if that's all you meant. (I suspect it's not.) You can cram as much of a block as will fit onto a line, you just need to end it with a newline. Joe