News for hackers. Stuff that matters.
Re:Rust is a hard way to make a web API by lumost on Saturday January 16, 2021 @09:59AM (#25802575)
I've been around go, java, and rust for a bit now (I even worked full-time on go projects for a couple years). Go really lacks a few features that are required for the numeric computing, and data processing. If you are building a web service that needs these kinds of things, it'll be a painful experience.

There are a bunch of things rust has which makes it attractive over go for these types of apps, from a practical perspective it tends to be better for a team to use a minimal number of languages across their stack.

The lack of generics means that each numeric type has it's own signature, if you deal with a lot of numbers with different precisions - you'll have a bunch of identical methods lying around just to support alternate precisions.

The lack of function/closure serialization in Go means that "moving compute to data" ala Spark or Hadoop becomes exceptionally difficult.

As native code, rust interfaces cleanly with C and can run in a few more places than Go - there are some active efforts to even support GPU kernels.

Go can't really do any of the three things above today, and the community is averse to include new features into the language for both good and bad reasons. Java can do the first two, but struggles in the last category.

Rust has an interesting opportunity to be a modern C which does the things java does and the things C/C++ do. But the library support and learning curves would need to improve dramatically for it to get there.

There are no comments on this comment yet.