6 ms·
Nim always looked to me as a modern version of OCaml made by someone who has no idea how to do static type systems properly. The language as a whole might have
by Drup 10y ago
Nim always looked to me as a modern version of OCaml made by someone who has no idea how to do static type systems properly. The language as a whole might have a nice feeling and convenient features, but the type system is really not good ...
D's type system, at least, is better designed.
On the other hand, I always considered Rust as the result of an ML programmer looking at C++ and thinking "this is bullshit, I can do it cleaner".
I might have a very ML view of the programming world, but that's ok, most other people have an ALGOL/C view of it. ;)
- jackmott 10y agoyeah i have fever dreams of C and ML having some sort of super baby. rust and nim are close but not quite
- yawaramin 10y agoI dream of something like https://github.com/pikatchu/LinearML https://github.com/pikatchu/LinearML one day coming into the scene.
- zem 10y agosome others worth checking out (all largely single-developer efforts): http://www.ats-lang.org/ http://www.ats-lang.org/ [ml + c + everything dialled up to eleven. linear and dependent types. comes out of academia, but under active development and slowly beginning to gather a community.] https://eigenstate.org/myrddin/ https://eigenstate.org/myrddin/ [not really familiar with this one but it looks interetsing. close to the metal, has pattern matching over algebraic datatypes but seems more towards the c than the ml end of the spectrum from the brief glance i took.] http://mythryl.org/ http://mythryl.org/ [never took off, sadly; i really liked the looks of this one and its ambitious goals. strong sml influence, with better posix integration and some c-like surface features. developer is currently battling cancer: http://mythryl.org/pipermail/mythryl/2016-April/000942.html http://mythryl.org/pipermail/mythryl/2016-April/000942.html] http://felix-lang.org/ http://felix-lang.org/ [spawn of ml + c++ rather than ml + c. under enthusiastic if haphazard development.] there have been a few others i've seen pop up over the years; i keep meaning to make a website or at least a github awesome-style list cataloguing and tracking them.
- Drup 10y agoFor all those propositions, I have only one question: Why would I use that instead of OCaml ? OCaml is far from being perfect, but it has lot's of features and a decent community (especially compared to all those hobby/research languages). OCaml can do pretty much anything except things like image processing and video game programming. I mostly don't care about those things, and if I did, I would use Rust. Now, from a research point of view, sure, those languages are interesting.
- zem 10y agoi'm in the same boat - i keep an interested eye on developments in the ML-cross-C space, but so far none of them seems compelling to use over ocaml. however, if one of them had a cross-compiler as good as go's, that would be a killer feature. i would really like an ml-like language i could use to develop desktop apps and trivially deliver binaries for multiple platforms.
- elechi 10y agoI've tried to use ATS, but I constantly run into installation problems. I wish I could try it, though, because it sounds super fast.
- mirekrusin 10y agoCrystal [1] seems to be nice-shaping language with good (algebraic) type system. [1] https://crystal-lang.org/ https://crystal-lang.org/
- zzzcpan 10y ago> most other people have an ALGOL/C view Maybe in the past, but not today. Today the perspective is from the very high level dynamically typed languages. Encoding things into types is out of the question.
- srean 10y agoThe Felix language may fit your taste then http://felix-lang.org/ http://felix-lang.org/ Its related to C++ somewhat in the way say Scala is related to Java. Its been around for a while. Felix has an ML like type system (stronger in fact), has pattern matching, has coroutines / fibers, and was designed to have a FFI less interop with C++ libraries. Very fast too.
- dom96 10y agoCan you explain what about Nim's type system is not good?
- feduzi 10y agoIt is more an expression of confusion rather than type system quality evaluation, but why does JSON parser's implementation returns its own types like JsonNode? Why doesn't it just return core types like: * JSON String -> NIM String * JSON Object -> NIM Hash * and so on... I've also had the same question when looking at https://crystal-lang.org https://crystal-lang.org. PS: I do not claim Nim's type system to be bad as I do not have an exact counterexample of a "better" type system.
- dom96 10y agoBecause the type of a JSON object's fields is not known at compile-time. let s = parseJson("{'A': 'foo'}") s["A"] # What type is this? We don't know until we parse the JSON.
- deleted 10y ago[deleted]