Live data from Hacker News

Should I Rust or Should I Go?

kerkour.com

41–50 of 178 posts

Re: Should I Rust or Should I Go?

#41
post #10

> As far as I know, today, Rust is the only programming language (other than C) able to create efficient WebAssembly (wasm) libraries Zig is also a good option for that, but the language is still in development.

Maybe once Zig supports WASIX

No, let's actually have a standard with some thoughtful design instead of just bunging a bunch of ancient POSIXisms along into another platform. Also, as far as I can tell, it's being pushed exclusively by Wasmer which looks to be a bit shady as a company.

Re: Should I Rust or Should I Go?

#42

> almost as easy to use as Python At risk of starting a flame war, I don't find Python easy to use at all so I have to question anything the author says at this point. I was first introduced to Python 25 years ago and stuck with QuickBasic, C and assembly. I recently tried to do some opencv stuff with Python and the dynamic typing made even the simplest things exhausting. Then there's the virtual environment and depe…

Did you try using a python IDE like Pycharm? Also python has type hints now and many libraries expose them.

Re: Should I Rust or Should I Go?

#44
post #19

I'm a little tired of this endless discussion ... it always pops up with programming languages, they are tools, use whatever is more fit for what you're doing, move fast, break things, learn

Some languages are better than others. I don't see what's wrong with debating it. Do you also get annoyed at people debating which football team is the best or the best cars?

Re: Should I Rust or Should I Go?

#45
post #17

In what world is Go more reliable or faster than Java? Especially modern Java (or other good JVM languages like Kotlin). It compiles faster but that is about it. Which is a good thing too because it's verbose AF and heavily reliant on code generation even after generics shipped so that compiler lines/s actually matters. The only knock you can put on Java for reliability is null-safety but lets be real, nil pointers,…

> Java is easily faster and more reliable than Go I work in Java for my day job and I disagree. 1. Cold starts for Java serverless (lambda) are worse than scripting languages 2. For everything else, Java uses 5-10x more memory than Go. The memory overhead difference is really noticeable while the CPU difference is often similar.

1. Ever thought about using class caches, AOT compilation e.g. OpenJ9, GraalVM,...?

2. Most of the time, a signal that the wrong algorithms and data structures are being used

Amazon isn't rushing to rewrite their infrastrure from Java into Go.

Re: Should I Rust or Should I Go?

#46

The features vs versions graph is more than a little nonsensical, and its conclusions even more so. > They should be stable and move slowly so that most of the time of your develoeprs is not spent fighting with their tools. I can't speak to Go's tooling base, but Rust's is head and shoulders above any other ecosystem that I've had to work with. This is definitely more a point in Rust's favor than against.

At the hobby level in Rust I am constantly in awe of how good the Rust tooling is.

Re: Should I Rust or Should I Go?

#47
post #17

In what world is Go more reliable or faster than Java? Especially modern Java (or other good JVM languages like Kotlin). It compiles faster but that is about it. Which is a good thing too because it's verbose AF and heavily reliant on code generation even after generics shipped so that compiler lines/s actually matters. The only knock you can put on Java for reliability is null-safety but lets be real, nil pointers,…

I feel that you've ignored all the reasons why folks feel that Go is more reliable and faster than Java. Fighting with the JVM - even in modern versions - is an absolute pain. The practical reality of using _any_ JVM language is wasted memory footprint, classpath issues, weird dependency graphs because a mega-apache-project was used to solve a simple problem, etc. Never mind getting basic things like RPC clients over…

Oh I am well aware of Java's warts and you hit a few of them but they are clearly -not- performance or reliability.

Yes there are lots of things that suck about Java and the JVM but you can't in good faith argue that it's slow and unreliable.

Re: Should I Rust or Should I Go?

#48

You should Typescript. Performance comparable to Go. A more flexible typing system than both. Easier to learn than both. A worse package system, but that can be mitigated with discipline. What Typescript currently lacks the most is affordances for embedded or performance intensive work as it's single threaded, but when performance matters use NAPI to use Rust in your Typescript, but the trajectory of performance of V…

Typescript uses an order of magnitude memory that Go. It also doesn’t support concurrency. With on Go pod you can have a web server that automatically uses multiple cores. You’ll get better performance in the real world as a result. You’ll pay less for it too.

Re: Should I Rust or Should I Go?

#50
post #37

Earlier quoted context omitted.

> Java is easily faster and more reliable than Go I work in Java for my day job and I disagree. 1. Cold starts for Java serverless (lambda) are worse than scripting languages 2. For everything else, Java uses 5-10x more memory than Go. The memory overhead difference is really noticeable while the CPU difference is often similar.

1. Yeah but serverless is completely unnecessary. JVM rewards you for long running processes. CRaC etc are there if you really care about that though. 2. If your Java code is using 5-10x more memory for the same task you are doing it wrong. Java objects do have higher overhead vs Go structs but not an order of magnitude. You could also be tuning the heap wrong, Java will use all the memory you give it and it won't be…

> serverless is completely unnecessary

I don't care for lambda either, but you can't just hand-wave away a huge portion of the current web. Devs use lambda, tens of thousands of them in fact. Java has an expensive startup and it affects them.

> you are doing it wrong

Perhaps, but I've seen it over-and-over again. Maybe you're extra talented, but regardless all us regular people seem to keep producing systems that are much more expensive to run with Java.

Post reply on HN