4 ms·
Yes, the secret is to write software that is composed of several modules that operate independently. Java's culture is to write a big ball of classes that are c
by coliveira 7y ago
Yes, the secret is to write software that is composed of several modules that operate independently. Java's culture is to write a big ball of classes that are combined to everything you need. In other languages you can create different programs that compose to provide the desired functionality. This was the original "aha" moment of C and UNIX designers. Even though C is a brittle language, it allows the decomposition of systems into small programs thanks to files and filters.
- ehnto 7y agoThere's nothing stopping you from writing uncoupled classes that work like small modules and maintaining them in one repository. Tightly coupled classes are a code smell even in Java, I wouldn't say it's the languages fault, more that the language is used more often in enterprise software and so all the frameworks/libraries/tooling is geared toward monoliths.
- harikb 7y agoFrom a sample size of one - My Python and Go code tend to be fewer lines per file compared to Java, for projects that are similar in complexity. This is not about the terseness/dense nature of the language, but the sheer simplicity in other languages to decouple file structure from class structure (at least within a given directory)
- Andrex 7y ago> Yes, the secret is to write software that is composed of several modules that operate independently. This isn't a secret, and in certain corners not even considered generally true -- backlash against microkernels and microservice architectures have intensified in the last half-decade, to give two examples.
- z3t4 7y ago90% of code bases that attempt modulability get it wrong. The idea is to be able to lift out functionality to be reused elsewhere. But what 90% of code bases do wrong is that they move code into modules, but you can not lift out those modes as they depend on all other modules. It might help if you use the words library instead of module. And public API instead of micro service.
- pjmlp 7y agoThe famous UNIX mantra hardly seen in commercial UNIX settings, but cargo cult across the FOSS UNIX community.