this post was submitted on 20 Dec 2023
187 points (96.5% liked)

Programmer Humor

31202 readers
1890 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS
 
top 7 comments
sorted by: hot top controversial new old
[–] stingpie 12 points 6 months ago (2 children)

Rust isn't real. Its just a bit much of abbreviated gibberish created by religious fanatics worshipping safe programming practices and reasonable error handling!

[–] [email protected] 2 points 6 months ago

You're going to borrow-checker hell now

[–] pecet 1 points 6 months ago

Wait until you learn about Lisp

[–] lightnegative 6 points 6 months ago

ngl, this meme tickled me

[–] [email protected] 1 points 5 months ago (1 children)

is that valid syntax in any context? i dont think it is

[–] [email protected] 4 points 5 months ago (1 children)

Pretty sure, it's not. That's why I included the error highlighting.

To make it a valid struct field, you'd need to throw in a Box+dyn:

pub pint: Box

For a function parameter, you need an impl and can't have the pub:

pint: impl Sized

Obviously, you could define your own struct or generic that also happens to be called Sized, but yeah, that's cheating.

[–] [email protected] 2 points 5 months ago

thats what i figured. thanks :-)