Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. Haskell > The Haskell Language

The Haskell Language

Referring back to John’s earlier answer, what made you “drool” when you were designing the class system?

Simon: We knew we had a bunch of problems surrounding how to take equality over arbitrary types, how to show and print arbitrary types, and how to do numerics. We knew we wanted integers and floats and double-precision numbers and arbitrary position integers. We did not want the programmer to have to write plus int and plus float and plus arbitrary precision integer.

We knew we wanted some way you could just write A + B and get whatever was correct. The ML solution to that problem was to allow you to write A + B, but the type of addition has to be resolved locally. If you write f(x,y) = x + y + 1, the system says, “Ah, you need to tell me more. You need to give a type signature to f( ) so I can know whether this plus is an integer plus or a float plus or a double plus.”


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint