Hacker News new | ask | show | jobs
by prunebeads 5017 days ago
For having extensively programmed using C++ and OCaml, I could not agree more.

The issues that most people focus on however are : portability to the platforms they're concerned about, performances on these platforms, richness of the ecosystem.

Game programmers cannot consider Haskell or OCaml as real alternatives to C++ for these reasons. Yet.

That said, people learning to use these languages become better programmers overall. They get a better sense of how to structure, validate their data, and avoid a lot of pitfalls. Have look at the answer made by a representative of one of the products mentioned by J.Carmack - she goes through some of the reflexes she acquired while using her product, and there's definitely an overlap with the way people code using Haskell or ML. It's not an accident that C++ is moving toward incorporating features from functional languages.

Just for these reasons alone people should learn to code with languages like that.

1 comments

Yes. Though, as with lots of projects, the core that has to be written in a C or C++ can be relatively small. Haskell's FFI is quite powerful, and it should be possible to use it in a way similar to how people embed Lua.