Hacker News new | ask | show | jobs
by moonchrome 4057 days ago
>OK, but doesn't it imply that I do not need Rust at all because I could write 90% of my code in Go and the rest 10% in C? Only silver bullet seekers and airy-fairy (t)he(o)retics will use Rust just for the sake of feeling contented about having 100% of a program written in seemingly one language.

Have you actually tried to do that or understand what Rust unsafe code means ? Interfacing between different run-times and memory management systems is complicated (and often slow), rust unsafe is simply giving up on compiler verification.

He misses the point on premature optimization entirely.

>For Android, it's also hardly probable, but for a different reason: there is way more than one architecture there, so JVM will do much better

And yet people write C++ code for Android, or is he arguing that Rust won't replace Java on Android (that's a pretty big straw man)

>I can't but remind you for one more time that the source of troubles is usually in humans, not technology . If your C++ code is not good enough or Java code is painfully slow, it's not because the technology is bad - it's because you haven't learned how to use it right. That way, you won't be satisfied with Rust either, but just for some other reasons. Isn't it easier to learn how to use more popular tools and start liking them?

Different tools require different amounts of effort to get things "right" and it's not simply a matter of "learning things" - humans have limited brain power - there's only so many things you can be aware of at any time - good tools reduce the number of those things required to get the job done - C++ is bad at this.

I agree with some of his points about the ergonomics and the implementation/tooling but I also feel like those are just growing pains - now is the time you start working on Rust for your weekend github project and start paving the way for actual real world use by early adopters which is at least a year off from this point.

1 comments

There's a lot of the "write X% in slowlang and (100-X)% in fastlang" thrown around, but I have to say, I've not seen too many such projects around.
Actually, in the CHICKEN Scheme community, this is done quite often, though you don't see it nearly as much because of how transparent it ends up being. Mostly stuff is written in Scheme / R5RS when possible, and C bindings to a faster library or implementation are exported using the bind egg when speed is of critical importance.

This is obviously not the norm, as the bind egg is very good, but it's definitely out there. Makes me wish that there were other languages which offered something similar to bind, but alas CHICKEN is the only one I know of thus far.

Skylight.io is one of the first production applications using Rust, and is exactly this.
IMO most python works this way in reality. For example the yaml module is calling out to libyaml and most heavy lifting modules are the same.