6 ms·
Rust is a better choice
by bruhlollol 6y ago
Rust is a better choice
- colesantiago 6y agoPlease expand more on why Rust "is a better choice"? I'm still not convinced by this statement.
- panta 6y agoFor what? Usually absolutes are not very useful...
- isatty 6y agoIt depends on _for what_. The most important part of these discussions often leaves out this important part. I use go as a python replacement for the most part and it’s brilliant at it. Types, compiled, good collection of external libraries and easy to read. For most of my scripting or mini projects I’m not willing to use C++ and by the same thought, I’m not willing to use rust either.
- vips7L 6y agoWhile I am no fan of Go, Rust is not a better alternative for most use cases of the average Go program. A better alternative would more likely be Java/Kotlin/Scala/C#. All with proper generics, good standard libraries/ecosystems, and fast run times.
- LandR 6y agoWhat if you need to compile to native? Some places don't accept having to have a VM like .NET or Java installed to run.
- jbreckmckye 6y agoAlso GC is a real no-no for real-time.
- nobleach 6y agoGo has a GC. Specifying the need for manual memory-management might be moving the goal-posts a bit. Edit Phone auto-correct from memory management to measurement.
- erik_seaberg 6y agoTo be fair, it's possible to write code that does no heap allocation in each of these languages. None of them guard against mistakes that create GC work, and Java would not be my choice for this.
- jbreckmckye 6y agoTrue. I've even had the "interesting" experience of writing low-allocation JavaScript (for 3D mostly).
- tfigment 6y ago.Net Core compiles to native and can be packaged to not need common runtime installed. And targets linux. You can even have it create a single file executable though admittedly it unpacks to temp folder at runtime if you do this. Down side is everything is like 80 MB minimum if you do this.
- vips7L 6y ago.Net has CoreRT to compile to native and the JVM has Graal Native Image. I've had success deploying native services using Quarkus [0] for Java. Additionally in modern java you would use jlink [1] to produce a minimal jvm image that ships with your application. No need to install. [0] https://quarkus.io/ https://quarkus.io/ [1] https://docs.oracle.com/en/java/javase/11/tools/jlink.html https://docs.oracle.com/en/java/javase/11/tools/jlink.html