Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There were far to many 'ah ha' moments. So, I'll take one that I don't hear too often ;). Suppose that you are working on FFI code:

    do
      x <- malloc
      poke x myCDouble
      return x
My C reflex was: 'I have to specify how much memory I want to allocate, but malloc doesn't take an argument, what the heck?'. Obviously, since Haskell has proper type inference, it can deduce that x is a pointer to a CDouble, and has no trouble allocating the proper amount of memory. But for a moment I was thinking it can read my mind :).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: