top | item 31602050

(no title)

aphexairlines | 3 years ago

I think that's ocaml. Higher level, with GC, nice type system, no traits but signatures and higher order modules might be enough for you, and a compiler that produces fast native binaries.

discuss

order

adastra22|3 years ago

There are plenty of languages to choose from if you allow a GC. I think Rust's niche is systems-level programming where a garbage collector is an impossibility. I wish there was an easier to use language with Rust's features which occupied this niche. I find myself reaching for modern C++ instead of Rust when I want to be productive :(

adev_|3 years ago

> I find myself reaching for modern C++ instead of Rust when I want to be productive :(

You are not the only one, this is also my experience.

And if you think about it: This is fine. There is a reason why we are not using TLA+ or format proofs framework when we want to do quick prototyping: Safety has a cost like everything else.

It can be a run-time cost (in case of ARC or GC languages) or a mental effort / productivity cost but it is still a cost.

pjmlp|3 years ago

Same here, I like Rust a lot, however in one side I already have JVM and .NET languages for 99% of the stuff I do, and for the remaining 1%, having C++ burned on my brain since 1994, with the 40 years of tooling, I rather spend the time using it.

adeon|3 years ago

I think you are pretty spot on here. I write Rust and Haskell most of the time, where the choice depends on the kind of project I'm working on. Also I've written Rust professionally but Haskell has been confined to random hobby projects.

I love Haskell but it has its own flavor of problems. I've meant to brush up a bit on OCaml; I've heard it has interesting features in its module system that Haskell does not have (maybe what you call "higher order modules").

ChadNauseam|3 years ago

Yup. Professional OCaml dev here, higher order modules are pretty cool. But OCaml shows its age and without typeclasses I don't find it very pleasant to program in. Most days I'd rather use Rust to be honest.

oxff|3 years ago

Ocaml is just a mess. Has like two standard libs. You'll just fighting everything but your application logic instead.

octachron|3 years ago

There is only one OCaml build system (dune) which is used by people that don't write their own build system. But yes, you have the freedom of using alternative to the OCaml standard library if you wish so.

pjmlp|3 years ago

Having an npm like ecosystem is hardly better.

jnash|3 years ago

Yep ocaml seems to be a perfect balance of all the best of other languages.

Amasuriel|3 years ago

Or F# if you want a wider ecosystem, it’s based on Ocaml and has many nice functional features, but you can utilize any .net code you want