News for hackers. Stuff that matters.
Re:Anders Hejlsberg: You Can't Maintain Large Programs in Ja... by sktrdie on Monday June 04, 2012 @07:01AM (#4063418)
This is not why you write tests. You write tests to be sure nothing breaks when you make changes.

And you should do this with any language, typed or not.

Re:Anders Hejlsberg: You Can't Maintain Large Programs in Ja... by nnythm on Monday June 04, 2012 @07:24AM (#4063488)
Using a language with static typing means that there are a lot of tests you don't have to write. Do you remember the units trick from physics? If you forgot which equation you're supposed to use, keep on using identities until you're in the units you're supposed to be. Static typing checks that your units are correct for free.
Re:Anders Hejlsberg: You Can't Maintain Large Programs in Ja... by brazzy on Monday June 04, 2012 @07:52AM (#4063562)
Well, not entirely for "free", but I do agree that the price is much lower than what you end up paying eventually for the convenience of dynamic typing.
Re:Anders Hejlsberg: You Can't Maintain Large Programs in Ja... by gaius on Monday June 04, 2012 @08:03AM (#4063600)
I don't ever have to write a test in OCaml to tell me what I need to fix if I change a function signature, or add another item to a struct or an enum, or change a function to return something else, or anything like that. The compiler does it all. Every code path is evaluated at compile time. 90% of unit testing is just not needed in OCaml or Haskell (and that which you do need, there's QuickCheck for).
Re:Anders Hejlsberg: You Can't Maintain Large Programs in Ja... by sirclueless on Monday June 04, 2012 @08:41AM (#4063699)
I had the same experience when writing Haskell. I would start by inserting a function call at the top level referencing a function I hadn't written yet, and then start hacking on the function and all its helpers. Without fail, as soon as the program compiled it was basically correct. The only thing that could go wrong were legitimate algorithmic errors, such as using the wrong base cases for recursion or something.