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

I'm one of those who need examples. Fortunately, haddock has this "source" link on each function, so I typically find something usable by browsing through the source of the library I'm using. This takes a lot more time than it would to just have an example in the docs themselves, of course (and isn't always even fruitful).

I do notice that after a while, I can get more and more from types alone, but I would never get to that point without examples first.

----

I don't see why examples couldn't be type-checked though, so they never become out-dated – is there no way to do that with haddock?



Type-checked examples are becoming more popular in the Scala community, e.g. using the tut tool. This is one of the few ways in which the Scala community appears to be ahead of the Haskell community, in terms of technology.





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

Search: