Recent submissions

Comment · 6 years ago
Hopefully Java will support proper values regarding inlining and on-stack allocation for non-primitive types soon, but yes option types are a benefit in Rust as long as you’re not using any more advanced reference libraries.
Comment · 6 years ago
Sure, but generics are available in Java as well and compared to Haskell and similar language I rate Rust as closer to Java.
Comment · 6 years ago
Sure, just reflecting on the “There also tends to be way less of the `EnterpriseJavaBeanFactory`-style code in idiomatic Rust.”
Comment · 6 years ago
Haven’t really seen anyone trying to use JVM options to get performance benefits without benchmarks for their specific use case the last 10 years or so.
Comment · 6 years ago
No offense to Tokio and Rust, I really like Rust, but having someone rewriting their app because of performance limitations in their previous language choice, isn’t really someone picking the right tool for the job necessary.

I’m not so sure they would have done the rewrite if the Go GC was performing better, and the choice of Rust seems primarily based on prior experience at the company writing performance sensitive code rather than delivering business value.

Comment · 6 years ago
They are not that similar to a struct in C in that they are not just about being a data carrier. So that might be confusing if that is what you expect.

Future work is intending to solve the third point and add deconstructing the record for pattern matching.

“We can declare a simple x-y point abstraction as follows: record Point(int x, int y) { } which will declare a final class called Point, with immutable components for x and y and appropriate accessors, constructors, equals, hashCode, and toString implementations.”

Comment · 6 years ago
Would dependent types help in this case? Add the reference type when creating the type and then you could have the compiler check that the contract holds.
Comment · 6 years ago
Comment · 6 years ago
They are still allowed to have police present at the internal border and checking both your id, itinerary and asking questions about your visit as long as it’s not “systematic”.
Comment · 6 years ago
Sure there is. They have checked my id on about half of the arrivals the last years.
Comment · 6 years ago
Yeah, having reads rebalancing the tree in a multithreaded subsystem is probably not optimal. Might be that the Splay-trees have outstayed their welcome :)

FreeBSD’s tree.h used to have, iirc, both RB- and Splay-trees.

Comment · 6 years ago
I believe Splay trees are usually mentioned as an alternative.
Comment · 7 years ago
I would like to have the result type for this, like in Rust:

enum Result<T, E> { Ok(T), Err(E), }

Comment · 7 years ago
Java 9 was a huge roadblock for upgrading since a lot of libraries were using internal apis and that mess took a few years longer that it should have.

Now the only supported Java version is 11, so a lot of companies have moved to 11 the last year.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton