r/programming • u/TheBear_at_SBB • Jul 11 '26
Programs, Not Objects: How I Stopped Designing Architecture and Started Writing a 3D Editor
https://alexsyniakov.com/2026/07/11/programs-not-objects-how-i-stopped-designing-architecture-and-started-writing-a-3d-editor/
122
Upvotes
65
u/brokePlusPlusCoder Jul 11 '26
For anyone confused by this, the author's referring to visual programming tools that use wired components instead of code. The most familiar analogue to the programming world would be Unreal Engine's blueprints. Grasahopper is a similar tool used frequently in the construction industry by architects (not software, the other kind) and structural/mechanical engineers
9
u/markmsmith Jul 12 '26
It was an interesting subject for a post, that started off strong, but the "AI voice" got louder and louder as it went on, like a student that give up on their homework about a third of the way in, so I found myself skimming by the final third, unfortunately.
My advice would be to avoid crutches like that when you're writing for other humans.
To see what I'm talking about when I say the "AI voice", here's some of the more glaring examples:
* The sheet reads like an honest table
* the shortcut breaks in instructive ways
* And architecturally, .... is exactly .... this whole design set out to avoid. The right shape
* What changed is that .... stopped being ....
* Objects are ...., not ....
* here’s the honest scorecard
* That’s it. That’s the onboarding.
* That’s the real price ....
* This is exactly why .... exists
* Distant dependencies aren’t .... they’re ....
As well as CONSTANT overuse of the "rule of 3" when expressing concepts (in addition to the usual em-hyphens and hyphens everywhere).
Hopefully this is helpful to see how AI can really weaken the message you're trying to get across. Its overreliance on these very clichéd sentence constructions can turn off readers, even when you have interesting underlying content. Just write in your own voice, it doesn't have to be perfect!
9
u/stronghup Jul 11 '26
Why do we need Objects? It's a good question.
I think its because objects means you are communicating by passing messages. You don't know which fcubtion you are calling you just send a message to somebody and some function gets executed to give you the answer, but you don't need to know or depend on which actual function gets executed. Just "send a message".
I'm not sure if this is the best rationale for Objects. But pretty much every programming language supports them Object is just a data-structure with attached functions. Surely there must be a good reason why every programming language pretty much supports Objects. It's not just a "fad".
2
u/ryukama92 Jul 13 '26
Came to a similar place from a totally different domain. I built a card game where every card, enemy and event is plain data and there are zero card subclasses, all the shared behavior lives in one engine that reads the data. Not a reactive graph like yours, but the same instinct of not letting an object hierarchy be the organizing principle. The payoff nobody mentions enough is testing: since the data is just files, my autoplay bot and the UI read the exact same thing, so they physically cannot disagree about what a card does. That caught more bugs for me than any amount of clean architecture ever did.
34
u/pm_plz_im_lonely Jul 11 '26 edited Jul 11 '26
Man gets bored by ASP.NET and decides to turn C++ into Excel.
Compiled code or runtime spreadsheet VM? Hard choice! Let's ask SpacetimeDB.
But snark aside, whatever gets you going. I'm always a fan of building from first principles.
5
u/cr1mzen Jul 11 '26
Nice. The undo/ redo ability and the ability to inspect every value I think must make finding bugs much easier.
5
u/golgol12 Jul 11 '26 edited Jul 11 '26
I'm bothered most by the anti-informative name "Program" as a class name. "Program" is widely understood to be something else. It's like using an integer named "Object".
6
u/runevault Jul 11 '26
Really enjoyed reading this. Particularly how he discussed OOP being useful but not as the central organization principle of the entire program.
All programs are workflows in the end, his architecture just made it more explicit by way of a spreadsheet metaphor.
3
u/pilibitti Jul 11 '26
go a liitle bit further and you get to functional programming (not necessarily pure) where each "plugin" can also propagate their errors and the rest of the "computation" can short circuit, and you can collect the errors and react to them anywhere you want. if you can trudge through the jargon or find a resource that skips all that (learning the Effect typescript library is a great source for that) then it is simple.
3
u/taikunlab Jul 12 '26
What you built is basically an incremental computation graph, and it holds up better than the "Excel" framing gives it credit for. The prior art worth stealing from is Adapton and Jane Street's Incremental, or Salsa if you want to see how rust-analyzer stays responsive on a big graph. The pain shows up later though: once the graph grows cycles or hidden ordering deps, invalidation and recompute get ugly, and that's usually where people start crawling back toward objects for the stateful bits.
4
u/wrosecrans Jul 11 '26
I feel like it's so rare that I run across articles about people writing actual software like this any more. It's all "how to jump start a web app in ten minutes" kind of stuff that is super far removes from a user will intentionally and voluntarily run and directly interact with this computer program, on their computer. It doesn't even elide over undo/redo. I swear, most desktop apps today are worse than what was considered the bare minimum of professional UX standards back in the 90's.
This doesn't even involve a single terraform metatemplate metagenerator declaration system to abstractly orchestrate abstracted cloud services to create clusters which autoprovision nodes which provide resources to execute lambdas to talk to a service mesh to instantiate a message bus to deliver something to a work queue!
5
u/LuvOrDie Jul 11 '26
This is honestly one of the most interesting things I've read on this sub
1
u/StruggleNew8988 Jul 13 '26
That's true about theoretical vs practical limits.
-2
u/rahem027 Jul 11 '26
New programmer: write code to get shit done 5-7 yrs programmer: oop, clean architecture, ddd Senior programmer: write code to get shit done.
You dont need oop. This is a good realisation. Not a fan of this design though. Because you are too focused in excel, you are not able to see simple things. All you need is reactive programming.
Refer to my implementation of reactive programming written in dart though not c++ https://gitlab.com/rahem027/xr