Readit News logoReadit News
tornadofart commented on 4 billion if statements (2023)   andreasjhkarlsson.github.... · Posted by u/damethos
tornadofart · 15 days ago
"The executable is around 2 MB"- Every dotnet programmer: "Those are rookie numbers!"
tornadofart commented on Computer science courses that don't exist, but should (2015)   prog21.dadgum.com/210.htm... · Posted by u/wonger_
ninetyninenine · 2 months ago
Unlearning object oriented programming

I think OOP became popular because it feels profound when you first grasp it. There is that euphoric moment when all the abstractions suddenly interlock, when inheritance, polymorphism, and encapsulation seem to dance together in perfect logic. It feels like you have entered a secret order of thinkers who understand something hidden. Each design pattern becomes a small enlightenment, a moment of realization that the system is clever in ways that ordinary code is not.

But if you step back far enough, the brilliance starts to look like ornament. Many of these patterns exist only to patch over the cracks in the paradigm itself. OOP is not a natural way of thinking, but a habit of thinking that bends reality into classes and hierarchies whether or not they belong there. It is not that OOP is wrong, but that it makes you mistake complexity for depth.

Then you encounter functional programming, and the same transformation begins again. It feels mind expanding at first, with the purity of immutable data, the beauty of composability, and the comfort of mathematical certainty. You trade one set of rituals for another: monads instead of patterns, recursion instead of loops, composition instead of inheritance. You feel that familiar rush of clarity, the sense that you have seen through the surface and reached the essence.

But this time the shift cuts deeper. The difference between the two paradigms is not just structural but philosophical. OOP organizes the world by binding behavior to state. A method belongs to an object, and that object carries with it an evolving identity. Once a method mutates state, it becomes tied to that state and to everything else that mutates it. The entire program becomes a web of hidden dependencies where touching one corner ripples through the whole. Over time you code yourself into a wall. Refactoring stops being a creative act and turns into damage control.

Functional programming severs that chain. It refuses to bind behavior to mutable state. Statelessness is its quiet revolution. It means that a function’s meaning depends only on its inputs and outputs. Nothing else. Such a function is predictable, transparent, and portable. It can be lifted out of one context and placed into another without consequence. The function becomes the fundamental atom of computation, the smallest truly modular unit in existence.

That changes everything. In functional programming, you stop thinking in terms of objects with responsibilities and start thinking in terms of transformations that can be freely composed. The program stops feeling like a fortress of interlocking rooms and begins to feel like a box of Lego bricks. Each function is a block, self-contained, perfectly shaped, designed to fit with others in infinitely many ways. You do not construct monoliths; you compose arrangements. When you need to change something, you do not tear down the wall. You simply reassemble the bricks into new forms.

This is the heart of functional nirvana: the dream of a codebase that can be reorganized endlessly without decay. Where every part is both independent and harmonious, where change feels like play instead of repair. Most programmers spend their careers trying to reach that state, that perfect organization where everything fits together, but OOP leads them into walls that cannot move. Functional programming leads them into open space, where everything can move.

Reality will always be mutable, but the beauty of functional programming is that it isolates that mutability at the edges. The pure core remains untouched, composed of functions that never lie and never change. Inside that core, every function is both a truth and a tool, as interchangeable as Lego bricks and as stable as mathematics.

So when we ask which paradigm handles complexity better, the answer becomes clear. OOP hides complexity behind walls. Functional programming dissolves it into parts so small and transparent that complexity itself becomes optional. The goal is not purity for its own sake, but freedom; the freedom to recompose, reorganize, and rethink without fear of collapse. That is the real enlightenment: when your code stops feeling like a structure you maintain and starts feeling like a universe you can endlessly reshape.

tornadofart · 2 months ago
OOP and FP are in theory orthogonal principles. Maybe I'm too much of a pragmatic and purists might scoff at me, but I use and appreciate both.
tornadofart commented on Must democracy "deliver the goods" to beat autocracy?   democracyorbust.bearblog.... · Posted by u/tornadofart
dpc_01234 · 5 months ago
> The playbook of a democratic leadership should be to crack down on fascists and others as hard as possible.

"Everything I like is good-label, everything I don't is bad-label" level of discourse.

tornadofart · 5 months ago
And yes. Everything I like is good-label, everything I don't is bad-label. I happen to like democracy and value viewpoints from conservative to leftist. I don't like fascism.
tornadofart commented on Must democracy "deliver the goods" to beat autocracy?   democracyorbust.bearblog.... · Posted by u/tornadofart
dpc_01234 · 5 months ago
> The playbook of a democratic leadership should be to crack down on fascists and others as hard as possible.

"Everything I like is good-label, everything I don't is bad-label" level of discourse.

tornadofart · 5 months ago
Corrected to "fascists and other autocrats"
tornadofart commented on Must democracy "deliver the goods" to beat autocracy?   democracyorbust.bearblog.... · Posted by u/tornadofart
arduanika · 5 months ago
Haha, sorry about the vitriol. After commenting, I saw you got a second rebuke from someone who thought you were being too harsh on China! (You weren't.)

And: Spanish Civil War is usually dated as 1936-39. So, s/1920s/1930s.

tornadofart · 5 months ago
Fixed
tornadofart commented on Must democracy "deliver the goods" to beat autocracy?   democracyorbust.bearblog.... · Posted by u/tornadofart
arduanika · 5 months ago
Haha, sorry about the vitriol. After commenting, I saw you got a second rebuke from someone who thought you were being too harsh on China! (You weren't.)

And: Spanish Civil War is usually dated as 1936-39. So, s/1920s/1930s.

tornadofart · 5 months ago
Oh, that's a bad typo.
tornadofart commented on Must democracy "deliver the goods" to beat autocracy?   democracyorbust.bearblog.... · Posted by u/tornadofart
nosignono · 5 months ago
A whole of stuff here feels... emotionally loaded in a way that's designed to be manipulative rather than heartfelt. Saying "A gun craves to be shot" is a clear example -- guns don't crave anything. I'm a pro-gun leftist, so maybe I'm just sensitive to this specific example.

Another example, much of the article uses "China" to suggest a broad, villainous other. Like so much American media, this reads like, "What are we, China?" or alternatively, "Surely we are better than China..." Which assumes a level of backwater, out of date, poorly run culture in China.

As a concrete example, the author says something to the effect of, "China claims to have quickly built a hospital, which I very much doubt." And explains nothing further -- why do you doubt that? What evidence do you have? Or are you just relying on your audience to credulously agree that because it came out of China, it's bad or a lie?

Additionally, the article appeals to the idea that we are all self interested by our fundamental nature. That we're all programmed to survive at all costs, and the means of that survival is individual self interest. Plenty of folks (myself included) believe that our survival instinct is one of social cohesion -- we survive because we band together into social groups.

So I agree with the conclusion -- we should be fighting fascists, and we should be doing it with strong policy and aggressively pushing fascists out of shared spaces (a bar that permits one nazi to be there is a nazi bar), I just think this article doesn't make the case for that very effectively.

tornadofart · 5 months ago
Removed the gun metaphor. It obviously did not convey the meaning I meant it to convey.
tornadofart commented on Must democracy "deliver the goods" to beat autocracy?   democracyorbust.bearblog.... · Posted by u/tornadofart
maldonad0 · 5 months ago
Democracy is a form of power organization. Liberalism is system of ethics.
tornadofart · 5 months ago
So far that was also my notion. Where did I conflate them?
tornadofart commented on Must democracy "deliver the goods" to beat autocracy?   democracyorbust.bearblog.... · Posted by u/tornadofart
maldonad0 · 5 months ago
The author is conflating democracy with liberalism.
tornadofart · 5 months ago
Author here. Enlighten me.

u/tornadofart

KarmaCake day173June 3, 2020View Original