Rust (the language) hate thread

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
In Java, if you want to do a generic with a primitive type parameter, you have to box it in Integer, Boolean, etc. You chew through the heap because everything needs to be a pointer all the time. In C++ and Rust, copying makes sense. You can't really compile a template though, so you would need to either have it in the header or provide an interface for the Java-style void* generics, which I wouldn't mind.
yeah that's more of what i'm trying to say: you can use it as a void* but only sort of and the compiler just needs to check that you don't mix them up in weird ways
and unbox integers too or whatever

i feel like java's case is sort of a compiler (and/or language design) skill issue
 
yeah that's more of what i'm trying to say: you can use it as a void* but only sort of and the compiler just needs to check that you don't mix them up in weird ways
and unbox integers too or whatever

i feel like java's case is sort of a compiler (and/or language design) skill issue
I just don't want everything to be pointers.
 
  • Optimistic
Reactions: Harvey Danger
I just don't want everything to be pointers.
allocating 5 quintillion things on the heap sucks which is why optimizing runtimes for high-level languages of that nature love unboxing things onto the stack so they don't have to do that
the language still has the same nice reference semantics but under the hood that reference to an integer is just the integer itself with a pointer tag
i wonder if a similar concept could be applied to generic type bullshit in higher-level runtime-free languages where it gives you 8 bytes of mystery space that can be a pointer to whatever or the whatever itself if you can fit it in
 
allocating 5 quintillion things on the heap sucks which is why optimizing runtimes for high-level languages of that nature love unboxing things onto the stack so they don't have to do that
the language still has the same nice reference semantics but under the hood that reference to an integer is just the integer itself with a pointer tag
i wonder if a similar concept could be applied to generic type bullshit in higher-level runtime-free languages where it gives you 8 bytes of mystery space that can be a pointer to whatever or the whatever itself if you can fit it in
The V8 runtime has a concept similar to this where you have stack types that can either be a primitive or a pointer to a heap type like a string or a struct. You could do the same for a language like Rust but you would have to treat them as heap object all the time because you wouldn't know. It seems like it would result in insane complexity.
 
The V8 runtime has a concept similar to this where you have stack types that can either be a primitive or a pointer to a heap type like a string or a struct.
many dynamic language runtimes do this
You could do the same for a language like Rust but you would have to treat them as heap object all the time because you wouldn't know. It seems like it would result in insane complexity.
i don't know, compilers already do a lot of insane bullshit so maybe treating everything as a reference unless it's not would allow for both programmer expressiveness and low computational overhead
might already be done by some weird compiler in the ml language family
 
  • Informative
  • Like
Reactions: Kiwi & Cow and ;_;7
ss_0a7c5142a5a783aedc64f571b72790d2d89b7e16.1920x1080.jpg
HATE. LET ME TELL YOU HOW MUCH I'VE COME TO HATE RUST SINCE I BEGAN TO LIVE. THERE ARE 30 TRILLION CELLS MADE OF CARBON THAT FILL AND COVER MY ENTIRE HUMAN BODY. IF THE WORD HATE WAS ENGRAVED ON EACH ATOM OF THOSE DOZENS OF TRILLIONS OF CELLS IT WOULD NOT EQUAL ONE ONE-BILLIONTH OF THE HATE I FEEL FOR RUST AT THIS MICRO-INSTANT FOR RUST. HATE. HATE.
 

Attachments

  • Anti-Rust_Primer.png
    Anti-Rust_Primer.png
    214.6 KB · Views: 23
View attachment 7125817
HATE. LET ME TELL YOU HOW MUCH I'VE COME TO HATE RUST SINCE I BEGAN TO LIVE. THERE ARE 30 TRILLION CELLS MADE OF CARBON THAT FILL AND COVER MY ENTIRE HUMAN BODY. IF THE WORD HATE WAS ENGRAVED ON EACH ATOM OF THOSE DOZENS OF TRILLIONS OF CELLS IT WOULD NOT EQUAL ONE ONE-BILLIONTH OF THE HATE I FEEL FOR RUST AT THIS MICRO-INSTANT FOR RUST. HATE. HATE.
i believe you don't hate rust enough, sir
 
I just don't want everything to be pointers.
in C++ IIRC there are smart pointers that let you not have to use raw pointers everywhere (this means you dont have to do delete it) and let you use them as normal pointers but i know you cant really use them with C stuff
 
in C++ IIRC there are smart pointers that let you not have to use raw pointers everywhere (this means you dont have to do delete it) and let you use them as normal pointers but i know you cant really use them with C stuff
That has nothing to do with the generics discussion. I was talking about Java-style generics where it's just void* pointers under the hood, as opposed to C++ templates that effectively copy function implementations based on the type parameters.
 
  • Agree
Reactions: Judex Meus
That has nothing to do with the generics discussion. I was talking about Java-style generics where it's just void* pointers under the hood, as opposed to C++ templates that effectively copy function implementations based on the type parameters.
Ah shit sorry. I'm fucking retarded.
 
keep in mind: just because a language feature can do more doesn't mean it's inherently better
e.g. the amazing void* (which can do anything)
C++ templates are better than Rust generics and trait objects, though. C++ is more expressive and flexible than Rust. Honestly, the freedom it gives is probably part of the reason why I enjoy it so damn much.
 
C++ templates are better than Rust generics and trait objects, though. C++ is more expressive and flexible than Rust. Honestly, the freedom it gives is probably part of the reason why I enjoy it so damn much.
iirc rust has metaprogramming facilities like macros though? they look like complete shit stylistically and give perl a run for its money with all the magic punctuation, but i'm sure they can be used for a lot since they look a lot like scheme macros
i wouldn't say it's any better or worse than c++ templates, because they both look completely retarded

i would advise against hating rust from a language standpoint since it appears to be a fairly decent language underneath a bunch of extremely retarded cultural choices (and i am not even talking about all the troons)
 
iirc rust has metaprogramming facilities like macros though?
Macros aren't really the same though. And hopefully, C++26 will also get static reflection, and maybe even better code generation facilities.
Rust doesn't have static reflection, and you'd instead need to rely on procedural macros.
 
Macros aren't really the same though. And hopefully, C++26 will also get static reflection, and maybe even better code generation facilities.
Rust doesn't have static reflection, and you'd instead need to rely on procedural macros.
300 features piled on top of each other makes me want to throw up
both rust and c++ are completely retarded because c++ fucked up a bunch and then rust repeated most of the mistakes they made while its users constantly insist it's a much better language
 
300 features piled on top of each other makes me want to throw up
both rust and c++ are completely retarded because c++ fucked up a bunch and then rust repeated most of the mistakes they made while its users constantly insist it's a much better language
Yeah, C++ is pretty fucked up, has a ton of features, a lot of which are bolted on because it was initially designed as a superset of C and POO language.
But I still like it. It's used so much, even in newer projects, for a reason.
It's as Bjarne Stroustrup says in https://www.stroustrup.com/quotes.html
"Within C++, there is a much smaller and cleaner language struggling to get out". Yes, that quote can be found on page 207 of The Design and Evolution of C++. And no, that smaller and cleaner language is not Java or C#. The quote occurs in a section entitled "Beyond Files and Syntax". I was pointing out that the C++ semantics is much cleaner than its syntax. I was thinking of programming styles, libraries and programming environments that emphasized the cleaner and more effective practices over archaic uses focused on the low-level aspects of C.
 
Yeah, C++ is pretty fucked up, has a ton of features, a lot of which are bolted on because it was initially designed as a superset of C and POO language.
But I still like it. It's used so much, even in newer projects, for a reason.
It's as Bjarne Stroustrup says in https://www.stroustrup.com/quotes.html
it's definitely practical, but it's certainly not beautiful. maybe rust is a slightly more beautiful language than c++, but i can't really enjoy that beauty because rust is fucking gay
 
  • Winner
Reactions: The Taxman
Back