this post was submitted on 29 Dec 2024
331 points (98.8% liked)

Programmer Humor

19881 readers
351 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 40 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 2 days ago
[–] [email protected] 80 points 6 days ago

I'm not sure if this is serious or not and that scares me.

[–] [email protected] 19 points 6 days ago (3 children)

I honestly don't know why they even have -> instead of just a dot like everyone else. The compiler knows whether it's a record, object, pointer, or any level of pointer to pointers.

Why make the programmer do the donkey work?

[–] [email protected] 1 points 11 hours ago

Operator overloading allows you to redefine what each operator does. It's essential to achieve a truly fucked up code base

[–] [email protected] 11 points 6 days ago

It's important for objects that can be dereferenced. Smart pointers have methods that can be accessed with dot syntax like swap(). You can still dereference through a smart pointer using arrow syntax to access methods on the referenced type since they overload the operator->() method.

[–] skulbuny 2 points 6 days ago

I love the arrow in functional programming. Some functional languages (like reasonml) has multiple arrow operators that did different things like this one -> would put the argument in the first position (a popular JS pattern) and the big arrow |> would put it last like most functional languages.

I know this is about CPP but honestly I love the way it looks, but I'm a weirdo lol

[–] [email protected] 14 points 6 days ago

Please don't give them ideas

[–] [email protected] 14 points 6 days ago (1 children)

I pray for this to be real because it's the perfect syntactic sugar for C++. The kind that you'd think makes sense if you didn't have to write C++ for anything more complex than a high school project.

[–] mindbleach 4 points 6 days ago

Right? Every C++ feature needs to be lightly cursed.

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

the :================D operator

[–] [email protected] 7 points 6 days ago

New language idea:

:====D
:==========D 0
:=======0==D~~~
:==========D ~0
[–] sunoc 22 points 1 week ago
[–] [email protected] 18 points 1 week ago (1 children)
[–] WhyJiffie 4 points 5 days ago (1 children)
[–] [email protected] 1 points 5 days ago

I really hope so but they first need a language specification. Without that it's no use for me.

[–] [email protected] 12 points 1 week ago
[–] [email protected] 8 points 1 week ago

C++ is a joke.