My wishful thinking is that nim would come in at the same number of lines as Python and very close to Rust's performance.
My wishful thinking is that nim would come in at the same number of lines as Python and very close to Rust's performance.
I have to say Rust got fairly hard to read and think about writing code with lifetimes when using closures. I couldn't decide at times whether to just use a trait with some cells or get the closure stuff working. This was in part because of some bugs (about 1.5 years ago) and the fact that their are 4 types function things. It is also probably because I haven't programmed in anything analogous that has lifetimes (I haven't programmed in C++ in more than 1.5 decades).
http://roscidus.com/blog/blog/2014/06/06/python-to-ocaml-ret...
This article in particular tackles polymorphic variants http://roscidus.com/blog/blog/2014/02/13/ocaml-what-you-gain... which solve one of the issues that the author had with Rust (enum subsets)
While Python does now have type annotations (pep 484) that are more powerful than Golang (generics) they currently aren't checked. I wouldn't be surprised if future Pythons start readily using these type annotations. At the same time I wouldn't be surprised if Golang never has generic (just my opinion).
* far more concise
* familiar exception handling mechanism
* classes and inheritance for the few places he needed them
* mutability
* bytestrings
missing are * proper support for enum subset types (i've felt the need for those too)
* exhaustiveness checking for uint8
* bit length (seems like a very niche thing; i'm sure someone's implemented it in a library somewhere)
rust makes a compelling competitor to d as an upgrade path from c++, but if you're porting code from a high-level, dynamic language like python, ocaml is almost always going to be a better experience.