Hacker News new | past | comments | ask | show | jobs | submit login

I mean, you can do pure functions. And those pure functions can operate on structs. And, once you're there, it's probably good hygiene to keep all the functions operating on a given struct in one file.

Congrats, you're back to 'encapsulation'! Encapsulation is actually the only important tool in that particular toolkit. We're mortals, we need coping tools to keep programs manageable.




That kind of "encapsulation" is simply storing code together with the data it belongs to (good practice) and possibly namespacing it together. It's not what they mean by "encapsulation" in OO courses, though it's arguably the only benefits "encapsulation" give you.


Would you be interested in doing a podcast together about programming? I'm a radical javascript programmer (search ONNEMI-4211). You seem smart. I've never made a podcast before.


On the one hand, you've got some amazing satire here, on the other hand, I'm a little insulted that it's directed at me of all people.

Upvoted anyways :)


Satire?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: