5 ms·
Do you think Rust will replace these over time? What are the blockers for this? Is Rust perceived as a "better" language by those in your profession but of cour
by jjallen 4y ago
Do you think Rust will replace these over time? What are the blockers for this? Is Rust perceived as a "better" language by those in your profession but of cours e you can't rewrite everything every 5-10 years?
Would finance apps be written in Rust today if all of the C++/Java applications weren't already written?
- vitorsr 4y agoI cannot name a single high-quality scientific computing and numerical algorithms Rust library that is not a thin layer over established C and C++ libraries.
- brettdong 4y agoI haven’t heard any major stock and derivatives exchange providing connectivity SDK or documentation in Rust but there is always plenty of them in C/C++.
- jjallen 4y agoThis is true. Though I see some market data providers offering Go ones.
- antonvs 4y agoI’m a big fan of Rust, and am currently working on a major Rust project, but I don’t think it’s currently a viable replacement for most Java apps, nor is it really intended to be. If anything Go is closer to fitting that bill, if only because of its traditional garbage collection. Applications written in Java by definition aren’t too concerned with memory management, and Rust is objectively a step backwards for them. Rust is a more credible replacement for C++, but there I think it will be fighting inertia. Many C++ devs are actively against changing languages. I’ve also seen people “writing C++ in Rust”, using unsafe everywhere so they don’t have to figure out how to design their code to fit Rust’s model. You then end up with a kind of worst of both worlds.
- capableweb 4y agoAlthough, "writing C++ in Rust with unsafe everywhere" does grant you the right to append "X written in Rust" when you finally do your Show HN, leading to a 26.7% increase in upvotes, so there is that.
- xmcqdpt2 4y agoI don't think Rust is really suited to replace the million LOC java apps that are found everywhere in finance. (The C++ ones probably ought to be rewritten in Java also, IMO. Or C#.) The reason that such enormous software exists at banks is because the business rules are immensely complicated. All this code basically exists to deal with the complexity of the financial world, not the complexity of interacting with computers in a high performance way with correct semantics. In most cases performance is very secondary to being able to onboard programmers quickly to write oodles of code that can be modified rapidly to address changes in regulation or markets. Java is good for this because it's a memory safe language, quite performant, super easy to learn (and quite common already) but also because you can abstract everything in a way that makes it possible to say, change the definition of currency exchange rates to account for new business rules without having to rewrite all the existing code. Rust would require passing Box<dyn T> absolutely everywhere, at which points you are basically writing Java with extra steps. And I say this as someone who loves Rust and work primarily in Scala.
- dzonga 4y agowould Golang have a role in finance ? pros and cons of java vs golang in finance besides java being widespread ?
- xmcqdpt2 4y agoYeah I mean in so far that Go is basically Java-like (GC-ed, statically typed, has interfaces, simple language) it could be used there too. Go targets very much the same kind of problem as Java. C# too. I only have a passing knowledge of Go so I can't comment on it's advantages or disadvantages much, although one of the great strengths of Go (tooling) is also very much a strength of Java (at least in large companies where there will be dev env teams that set up the Java environment for you.)
- sclarisse 4y agoHaving seen actual sprawling Java codebases at banks and elsewhere, they tend to end up sprawling as they deal with (a) some specific old computer, or (b) the complexity of some dumb framework in the language itself. The business logic only approaches that level when you’re dealing with specific products are treated for things like taxes and customs, or, medical billing codes.
- MattPalmer1086 4y agoI personally like Rust a lot, but it isn't on our radar at all. Nobody has even mentioned it. Java and C++ are fine for what we do. What advantages (other than memory safety, which Java has too) do you see in Rust?
- jjnoakes 4y agoNot OP and not choosing a side in this thread on the RIIR topic, but I would like to address why I like Rust over those other language - in addition to memory safety, I really like the stronger types (specifically sum types), the move semantics, and the data-race safety.
- fndex 4y agoI know Rust is a systems programming language, but I've been playing with it for some time writing high-level stuff like REST/GraphQL APIs, websockets and web backends in general. And I have to admit it is a breath of fresh air. No crazy enforced OOP with a gazillion classes and inheritance, no non-sense design patterns just because the language enforces you to use OOP for everything, an amazing type system, no null pointer exceptions, great compiler error messages and so on... Of course there are problems, like any other language, but it is crazy how it as a systems programming language is so good at expressing domain logic. Java has a much bigger ecosystem, but judging JUST by the language design, I'd pick Rust over Java without thinking twice.