this post was submitted on 14 Mar 2024
7 points (100.0% liked)

Programmer Humor

22617 readers
862 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 year ago

StackOverflow: Question closed as duplicate. Someone else already asked whether or not something is a nut.

[–] [email protected] 2 points 1 year ago (1 children)

Java: "Sorry, but the developers of Peanut didn't declare it to implement the Crackable interface, even though it has all the relevant methods, so if you want to treat it like a nut your choices are write a wrapper class or call those methods using Reflections"

[–] [email protected] 1 points 1 year ago (2 children)

Swift’s extensions system has spoiled me, and I feel the pain of this whenever I have to write Java

[–] [email protected] 1 points 1 year ago

You should take a look at kotlin, pretty similar to swift and fully interoperable with java.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Ditto, but Rust's traits. God those are so fun. It's like duck typing a la Python but you can just slap whatever methods you want on a foreign type without worrying about breaking anything because they're only visible to the current crate (or other crates that import the Trait)

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (2 children)

Rust is more like: unless you can mathematically prove to me that this is equivalent to a nut there is no ducking way I'll ever let you compiled this.

[–] [email protected] 1 points 1 year ago

And hot take, but that's good. I'm absolutely stupid enough for idiot gloves like that.

[–] [email protected] -1 points 1 year ago* (last edited 1 year ago) (1 children)
[–] [email protected] 0 points 1 year ago (1 children)

If you can make safe Rust segfault you're doing something wrong.

[–] [email protected] -1 points 1 year ago (1 children)

IME Rust programs crash at about the same rate as other languages. "Rewrite everything in Rust" hasn't made much of a difference for me, so far.

[–] [email protected] 1 points 1 year ago

A crash is different to a SEGFAULT. I'd be very surprised to see a safe rust program segfault unless it was actively exploiting a compiler bug.

[–] [email protected] 1 points 1 year ago

"What Java said."

Okay, that one made me chuckle.