this post was submitted on 12 Mar 2024
1100 points (95.8% liked)

Programmer Humor

32400 readers
252 users here now

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

Rules:

founded 5 years ago
MODERATORS
 

Please dont take this seriously guys its just a dumb meme I haven't written a single line of code in half of these languages

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 8 months ago

C could just be a blank and you have to bit blit the arrow on yourself.

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

Actual C: Problem → Segmentation fault

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

Actual Problem: C → Segmentation Fault

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

Actual Problem: C → Segmentation Fault?

[–] [email protected] 25 points 8 months ago* (last edited 8 months ago) (2 children)

C:

Problemreturn Solution;

C++:

Problem

const [auto]&& (Problem&& problem) noexcept(noexcept( Solution<Problem>{}(std::forward<Problem>(problem)) )) { return Solution<Problem>{}(std::forward<Problem>(problem)); } -> decltype( Solution<Problem>{}(std::forward<Problem>(problem)) )
[–] [email protected] 5 points 8 months ago (1 children)

But this doesn't return the Solution. You don't invoke the lambda.

(Or does C++ have implied returns now? Last I heard there was implied move)

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

Actually I do; it's the {} that initializes the lambda, and the parenthesis after invokes.

That said, it would have been fun.

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

C:

return *(solution_t*)&problem;
[–] [email protected] 5 points 8 months ago

Maximum optimization!

[–] [email protected] 29 points 8 months ago (1 children)
[–] [email protected] 16 points 8 months ago

I’ve seen this before but don’t accept it myself. There are cases where you just wanted to cat. In this case, maybe to review the problem. Then you want to extend the command. Preserving it in the next commands where you start stacking on pipes is useful since it can be fewer strokes and maintain a habit.

load more comments
view more: next ›