3 ms·
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 functio
by yourbandsucks 7y ago
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.
- erikpukinskis 7y agoWould 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.
- yourbandsucks 7y agoOn 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 :)
- erikpukinskis 7y agoSatire?
- TeMPOraL 7y agoThat 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.