by nsonha · 5y ago · 0 comments
Can we just stick with "best tool for the job"?
Rust for performance-critical systems and, say, typescript for front-end? Using a single language for everything is a wet dream that always ends up in complexity and more work as you're fighting the "native" ecosystem.
You don't need to offer a perspective on everything, and I prefer the critiques I read to be well-founded.
Isn't typescript contract?
This is not really about JS, if I want to replace JS I'll pick a language with similar characteristics that make it successful. Similar to how you replace C++ with rust, another language that gives you control of memory. For app developments they are simplicity and a focus on domain modelling with a good type system (this is typescript teritory), NOT memory safey.
And don't tell me that rust's type system is powerful too, yes, but it's also complex and the focus isn't domain modelling. Like C++ and golang's type systems, it's there to aid the compilers/borrow checker, not developers.
Example of such language in my other comment: kotlin, F#
> the focus isn't domain modelling, like C++ and golang's type systems
Could you please explain what you mean by this? I've honestly not heard this argument before so I'd be interested what domain modeling Rust doesn't encourage/support that, e.g. Go does.