Wearing the hair shirt Wearing the hair shirt - Microsoft Research

Wearing the hair shirt Wearing the hair shirt - Microsoft Research Wearing the hair shirt Wearing the hair shirt - Microsoft Research

research.microsoft.com
from research.microsoft.com More from this publisher
27.12.2013 Views

Syntactic redundancy Seductive idea: provide just one way of doing any particular thing Haskell’s choice: provide multiple ways, and let the programmer decide Main example: “declaration style” vs “expression style”

“Declaration style” Define a function as a series of independent equations map f [] = [] map f (x:xs) = f x : map f xs sign x | x>0 = 1 | x==0 = 0 | x

Syntactic redundancy<br />

Seductive idea: provide just one way<br />

of doing any particular thing<br />

Haskell’s choice: provide multiple<br />

ways, and let <strong>the</strong> programmer decide<br />

Main example: “declaration style” vs<br />

“expression style”

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!