4 ms·
I love this. For as long as code needs to be maintained, code will always be just as much about communicating with people as it is about people communicating w
by gorgoiler 7y ago
I love this. For as long as code needs to be maintained, code will always be just as much about communicating with people as it is about people communicating with machines.
One thing I still enjoy about message passing OO (by which I really mean Ruby) is how it’s really easy to separate concerns to the extent that each file contains one module/class with one public and a few private methods in it. I went a bit bonkers this year and found myself doing one method per module, which is the extreme version of this.
Languages with mixins are great for this too. Mixins are, amongst other things, a nice shortcut around composition that lets you put individual facets of functionality in separate files, albeit with fewer guarantees about code remaining uncoupled.
It’s a shame Ruby’s module system doesn’t better support private for modules though.
- Gunax 7y agoAccording to the SICP “Programs must be written for people to read, and only incidentally for machines to execute.”
- ajnin 7y agoI don't see how splitting code in multiple modules makes it easier to communicate to others. It forces you to constantly switch places, which, knowing the limitations of the brain with regards to short term memory, would make it harder to keep a mental model. With mixins you don't even know where a particular function might come from, must be a nightmare following a trail when you don't know the code.