Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Haskell rocks

Name: Anonymous 2007-03-24 16:50 ID:xVqPIWca

In this thread we praise the awesome Haskell and extol on its glorious features

for instance, say you have an arbitrarily complex data type, if you add
          deriving (Show, Read, Eq)
to the definition

Haskell will automatically figure out how to 1) convert it into a string 2) parse a string into data 3) compare for equality

How fucking awesome is that! Automatic hassle-free serialisation!

No more fucking around with how to parse a matrix! read m :: Matrix yay!

Name: Anonymous 2007-03-28 2:33 ID:ZODNWUws

One word, Forced indentation of code.

You may have noticed that I use indention to indicate lines that are part of a block of source code. This is not simply good style, but it is also part of Haskell's syntax. Indentation denotes structure. Specifically, changing the indentation from one line to the next indicates that a block of code has begun or ended. Also, Haskell will not let you place the definitions for two functions one line after another. Instead it demands a blank line to indicate that the definition of a function has truly finished. This all enforces good style, and it greatly reduces the amount of junk syntax in the language, such as '{', '}', and ';'.

Thread over.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List