Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Quite a good summary. I use OCaml at Red Hat for a lot of virtualization tools. I had reason to use Python for some code quite recently, and it reminded me of how much better ML-derived languages are.

The things I found awful about Python compared to OCaml:

- Lots of bugs which are never noticed, even at run time, eg. along error paths. 'pylint' helps here, but it doesn't catch all the bugs, and IMHO if you need a lint tool to fix your language you're doing it wrong in the first place.

- Really hard to refactor code. In OCaml the compiler helps refactoring -- you just break something and hit 'make -k' until you've fixed all the places that need fixing. In Python you have to visually grep all the code, which doesn't scale and is bug-prone.

- I miss nested variable declarations.

- Poor support for data types. Python in theory has lots, but in practice everyone's using dictionaries and objects, which are unsafe and introduce bugs by design.

- Slow. Really slow.

There were a few good aspects of Python, but I ended up with a lot of buggy code, and I know there are many more bugs in there which I haven't yet found, which just wouldn't be the case with a statically typed, type-inferenced ML-derived language.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: