News for hackers. Stuff that matters.
Re:Experiment: Unit testing isn't enough; You need static ty... by ocharles on Wednesday June 20, 2012 @10:33AM (#4137142)
Amen, I've spent the last 3 years of my career working on an increasingly complicated Perl project and frankly, I've had enough. My pet projects now are all Haskell and I can't believe how fun it is.

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.

Re:Experiment: Unit testing isn't enough; You need static ty... by MatthewPhillips on Wednesday June 20, 2012 @11:22AM (#4137391)
Are you having fun because you switched to a statically typed language or are you having fun because you switched to a functional language? Would you be having less fun had you chosen Clojure?
Re:Experiment: Unit testing isn't enough; You need static ty... by cageface on Wednesday June 20, 2012 @11:26AM (#4137413)
I started a parallel implementation of a bunch of machine learning algorithms in Clojure and Scala. I figured the Clojure version would pull out ahead thanks to my previous lisp experience and lisp's history in that domain.

I was very surprised to discover that my Scala code was a lot easier to understand and maintain and had fewer bugs.

Re:Experiment: Unit testing isn't enough; You need static ty... by gnuvince on Wednesday June 20, 2012 @12:55PM (#4137839)
What do you attribute this to? The static typing of Scala or the libraries that you use?
Re:Experiment: Unit testing isn't enough; You need static ty... by cageface on Wednesday June 20, 2012 @05:10PM (#4139122)
Definitely typing. I wasn't using any libraries.
Re:Experiment: Unit testing isn't enough; You need static ty... by ocharles on Wednesday June 20, 2012 @01:06PM (#4137886)
You know, I'm probably having fun because of both. I love the type system Haskell gives me for exploring a problem space without diving into a solution. I am enjoying working in a functional language because it forces me to work in really small pieces and slot them together. I try and do this in Perl too, of course, but it can sometimes be easier to just cargo cult some things and forget to come back to them.

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.