3 ms·
> Didn't read the post I think the post is pretty important context, in fact it's the main thing, so this "comment without reading" is a bit too reddit, and no
by thomashabets2 2y ago
> Didn't read the post
I think the post is pretty important context, in fact it's the main thing, so this "comment without reading" is a bit too reddit, and not enough hackernews.
> I don't think it would be where it is today without being able to stand on the shoulders of giants like java.
The present is a function of the past. Not sure what that's supposed to prove. I do think that Rust (and to a lesser extent Go) has learned from Java some things not to do.
So I do think that the decisions that seemed like a good idea at the time, and proved to be mistakes, are the reasons we do not have those same mistakes in Rust and (to a lesser extent) Go.
If they hadn't been mistakes, then Rust and Go would repeat them, wouldn't you say?
> There are a lot of things that oop languages pioneered that are now in other languages.
Yes, but most of the innovation in Java specifically have since been walked back by newer languages. That's my point.
> In rust specifically, there is a mixture of features taken from functional and oop languages that are a pleasure to use.
Indeed. But what did Java invent, that Rust took in?
If we take C++, and move in the direction of 1) more OOP, 2) More heap usage, 3) More exceptions, 4) Worse error messages, 5) virtual machines, 6) GC, 7) pre-zoned memory, then that's Java.
For literally all of those bullet points Rust went the opposite way.
1) less OOP, 2) structs are one whole heap object, not one per field, 3) less exceptions, 4) Way better error messages, 5) native code again, 6) not GC, 7) "regular" allocators.
So I agree with you if you mean that by standing of the shoulders of Java you mean "let Java be a warning example of what not to do".
If you mean something else, then I don't know what you're talking about. And since you say you replied without reading the post, probably neither do you.
Edit: by the way by "more heap usage" I don't mean more bytes. I mean e.g. a struct with members is in Java many objects on the heap, but in C++, Rust, and Go, it's a single one.