this post was submitted on 28 Feb 2025
687 points (99.3% liked)

Programmer Humor

20829 readers
2420 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 50 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 3 hours ago (1 children)

wow, there are some really steaming takes on anarchism in the comments here.

[–] UnderpantsWeevil 1 points 29 minutes ago

Real State of Exception Hours

[–] [email protected] 5 points 5 hours ago

Dunno how accurate this is but if you like doing those quizzes see where you fall on leftist values. https://leftvalues.github.io/index.html

[–] [email protected] 5 points 5 hours ago

Depends on how pure you want it to be, without any side effects

[–] [email protected] 43 points 10 hours ago (3 children)

Nothing wrong with classes in functional programming though. Just return a new instance of the class from your method, rather than mutating an existing instance.

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

Javascript:

I heard you like mutating class data so I'm mutating the data you can put in your class data, dawg.

[–] [email protected] 2 points 1 hour ago

JavaScript: a language for mutants.

[–] amon 1 points 2 hours ago

Classes are just another way to define an object. Heck even Lisp has objects!

[–] [email protected] 11 points 7 hours ago* (last edited 7 hours ago)

Right, I think the two aren't as different as they appear. You can think of a closure as an object with just one method.

If OO programming is fundamentally about objects sending messages to each other, then there are many ways to approach that. Some of those ways are totally compatible with functional programming.

The legacy of C++ has dominated what OOP is "supposed" to be, but it doesn't have to work like that.

load more comments
view more: next ›