News for hackers. Stuff that matters.
Re:Common Rust Lifetime Misconceptions by brabel on Tuesday December 05, 2023 @02:24AM (#38527996)
> as Rust is many times faster than other languages even with liberal cloning

Have you really compared? I have. Rust was faster for "small input", but quickly got beaten by Java and other languages I tried because the cost of doing things this way grows exponentially. I suggest you run benchmarks before you make your mind up and start throwing opinions around.

Re:Common Rust Lifetime Misconceptions by anticodon on Tuesday December 05, 2023 @04:14AM (#38528561)
I have never benchmarked Java vs other languages, but from experience java applications always have horrible startup time. So, there might be some contexts in which long running Java application can beat Rust or other language, but if you need something that starts instantly (like CLI utilities) Java is a no-go.

Another wart is that there are some written and non-written standards on CLI arguments (e.g. long option names should start with double hyphens) that 99% of Java CLI apps violate for some reason. Maybe I'm a perfectionist but it makes me uncomfortable to use Java CLI apps.

Re:Common Rust Lifetime Misconceptions by hu3 on Tuesday December 05, 2023 @07:40AM (#38530013)
I'm no Java expert but they seem to be solving startup time with ahead-of-time (AOT) compilation.

https://medium.com/@subhajitc77/how-java-17-and-spring-boot-...

Re:Common Rust Lifetime Misconceptions by riku_iki on Tuesday December 05, 2023 @06:17PM (#38538292)
> So, there might be some contexts in which long running Java application can beat Rust

yes, context is essentially all server side SaaS business segment..

Re:Common Rust Lifetime Misconceptions by lolinder on Tuesday December 05, 2023 @09:27PM (#38539833)
> So, there might be some contexts in which long running Java application can beat Rust or other language, but if you need something that starts instantly (like CLI utilities) Java is a no-go.

Maybe I'm in a bubble, but to me this sounds like Java would have faster performance in nearly all professional development situations. Very few people are writing CLI tools compared to those writing server code.

Re:Common Rust Lifetime Misconceptions by satvikpendem on Tuesday December 05, 2023 @07:46AM (#38530053)
My other languages generally used are Python and TypeScript of which it absolutely is faster. I don't write Java anymore, generally speaking, so it could be faster, but it has its own problems, such as having null pointers and exceptions.