After over ten years working in dynamic languages I'm very happy to have a compiler on my side again.
After over ten years working in dynamic languages I'm very happy to have a compiler on my side again.
I spend most of my time these days fixing bugs and regressions due to the sheer scale of the project, and I'm a running meme at work for saying "a type checker could have caught that!". I can't imagine going back to a dynamic language now.
I was very surprised to discover that my Scala code was a lot easier to understand and maintain and had fewer bugs.
I think what I enjoy most is the type system though, and the ability to make massive refactorings until stuff compiles. 9 times out of 10, things just work after that.
That said, I'm currently hacking on a compiler to see if I can come up with a design for a static language that's almost as pleasant to use as a dynamic one, so I'm not completely hopeless. But it certainly seems like the data point that until now no such superior type system (strict but flexible) has become widely popular should not be underestimated.
These days it's mostly C++/Obj-C but I'm keeping an eye on Haskell for iOS.
Really? Is that even possible? Can't imagine Apple being okay with that.
that's basically the design criteria behind Go's type system.
[1]: http://existentialtype.wordpress.com/2011/03/15/boolean-blin...
My problem with Go is that it does not have sum-types and pattern-matching. This means that branching (conditionals) in Go do not gain any type-information. And that means that programmers have to manually keep track of the invariants that hold true in each of their conditionals, and if they get them wrong, they get no help from the compiler.