From: Dan Doel Date: 2004-01-10T04:31:17+09:00 Subject: Re: block delimiting Joe Mason wrote: >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. > > Well, if you're posting Haskell to a web page, it's wise to do it like this: let { y = a*b; f x = (x+y)/y } in f c + f d instead of: let y = a*b f x = (x+y)/y in f c + f d >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. > > Right, I was talking about the above Haskell example. In Ruby and Python, a b can be short for: a; b; But Haskell goes further, making layout-based syntax short for a delimited syntax. I imagine that Martin said Haskell does it the right way because it doesn't force you one way or the other, so people who can't stand significant whitespace aren't turned off from an otherwise useful language, and those who like/don't mind it can use it. - Dan