All Abstractions Are the Same
Back when people were writing code, you’d occasionally hear me say things like,
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Back when people were writing code, you’d occasionally hear me say things like, “static classes are just folders”, or “a microservice is just a function”, or “anything is a monolith if you zoom out enough”, or insert any other two buzzwords you can think of.
And I’ll die on that hill. There’s truth in all of those.
…and I think that’s about it. The rest is mostly perspective and scale. I mean like if you have some program that can hot-reload classes, then isn’t that functionally similar to deploying a microservice?
Now, the latter gives you more isolation and fault tolerance, which may be preferable in an organization with many meat monkeys working on the same codebase. But I feel like with AI we are going to have to rethink a lot of our assumptions about code organization and deployment.
What if hot-reload is preferable sometimes, because it allows you to move fast?
And like, when I vibecode and notice the codebase is degrading, and the same errors start popping up all over the place, meaning a refactor is due, then these days I’m just like, “I think this is what is happening and you should colocate these pieces of code to fix it”, followed by “look, these 5 things are actually the same thing”, and that usually solves the issue. Do I care whether the abstractions AI finds are functions, or classes, or folders? Not really.
The important thing is that related code is now colocated.
One of my first blog posts on this site was about how to structure any codebase, and now that I don’t even write the code that I’m structuring anymore, it starts to become more and more obvious: Every abstraction is the same.
And this is any software ever. All the rest… the stuff that AI does now… it’s all just mechanical. Programming languages are all the same. Virtual classes and mixins and folders and modules, they’re all the same. While and for and switch and if, they are all the same.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。