Posted: Mar 07, 2012 8:43 pm
by mizvekov
VazScep wrote:If I don't get a post-doc position, I'm planning to go into industry. There's work out there using strongly typed functional languages (a friend of mine codes in Ocaml for a living, which would be awesome).

I don't doubt that, it's just that I have been working a lot with embedded lately, and I am mostly using C / subset of C++, sometimes even assembly, because code size often matters (sometimes only a few kb of flash).
VazScep wrote:
But I wouldn't say I've left the C++ world forever. I'm pretty confident that I'd still have fun being a C++/Java/C# programmer, and I'm pretty sure I could get excited about learning C++ properly, with all the Boost libraries, and any cool shit that's in the latest standard. There's also C#, though, which takes a lot of inspiration from the functional world and from Haskell (LINQ is just monads underneath).

There is also SCALA, which has many similarities to Haskell, but also has a more familiar syntax and java interoperability, so I think it has much more potential for industry acceptance.
VazScep wrote:
I actually left C++, Java and C# behind when I discovered languages in the Lisp family (Smalltalk and Common Lisp in particular) and I came to the conclusion that static typing was stupid. Then about a year into my phd I discovered the ML family of languages, and I'm now pretty obsessed with types. I think now I'd rather code in C++ than I would in an untyped language.

I was pretty obsessed with emulators starting when I was a teen, and when I first learned LISP when I was in college, I looked down on it, probably because it felt less expressive, I was more concerned with runtime performance than I should, and also because it was less widely used/less appropriate for the kind of problems that I was concerned about.
It took learning a bit about lambda calculus to start liking it, and also learning how easy (formulaic) it is to translate algorithms from iterative to recursive.

I agree about the Haskell type system, I think it is amazing how cleanly It can express complex things. Function types in particular, it's too cool that you can do things like partial application just naturally, and it all ties together perfectly.

Modern c++ has some of these new things, but the syntax for it is clunky, the type system a lot less expressive, and it still suffers from some of the same old flaws, like incomprehensible compiler error messages.