On Tue, Mar 4, 2008 at 4:16 AM, Ketil Malde <[EMAIL PROTECTED]> wrote: > Paul Johnson <[EMAIL PROTECTED]> writes: > > > I'm surprised you found the significant whitespace difficult. > > I wonder if this has something to do with the editor one uses? I use > Emacs, and just keep hitting TAB, cycling through possible alignments, > until things align sensibly. I haven't really tried, but I can > imagine lining things up manually would be more painful, especially > if mixing tabs and spaces.
Especially if mixing tabs and spaces indeed. Haskell does the Python thing of assuming that a tab is 8 spaces, which IMO is a mistake. The sensible thing to do if you have a whitespace-sensitive language that accepts both spaces in tabs is to make them incomparable to each other; i.e. main = do <sp><sp>putStrLn $ "Hello" <sp><sp><tab>++ "World" -- compiles fine main = do <sp><sp>putStrLn $ "Hello" <tab>++ "World" -- error, can't tell how indented '++ "World"' is... Luke _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe