|
|
Darren New wrote:
> http://ozlabs.org/~rusty/index.cgi/tech/2008-03-30.html
10. It's impossible to get wrong? Well THAT sounds impossible to
implement! ;-)
9. The compiler won't let you get it wrong. Hmm, this is why I like
Haskell. We have a saying; "if it compiles, it probably works
correctly". Obviously this isn't *literally* true - but it's a
well-known saying for a reason. It's quite shocking the number of times
just getting the program to the point where it type-checks means it is
bug-free. I've never seen another language like it...
8. The compiler will warn you if you get it wrong. Haskell falls down
horribly here. Due to automatic type interence, if you get a
compile-time error, it's usually pretty cryptic. (E.g., "unification
yields infinite type in expression ...")
7. The obvious way is (probably) the correct way. I commend this to the
house...
6. The name tells you how to use it. From Haskell's standard libaries, I
present the following examples:
unsafePerformIO.
unsafeInterleaveIO
reallyUnsafePointerEquityTest
I'm totally loving that last one... I'm half-expecting to find a
function some day named dontEvenThinkAboutCallingThisOrYouWillDIE
5. It'll die at runtime if you do it wrong. This can work too - but it's
really helpful if you know *why* it died...
4. Follow convention. Ah, standards. So many to choose from...
3. RTMF. It really helps if there IS a manual, it's CORRECT, and it's UP
TO DATE. Not to mention being COMPREHENSIBLE...
2. Luke, use the source! That's not even funny...
1. Mailing list? You've got to be kidding!
Post a reply to this message
|
|