HACKER Q&A
📣 lucidguppy

Language Support of Modularity


After reading this post on HN: http://blogs.newardassociates.com/blog/2023/you-want-modules-not-microservices.html (you want modules not microservices)

I'd like to know which languages support high modularity. Essentially which languages could you have separate teams work on plugins/libraries that could be used and those users would be forced to only use the public interfaces of the library.

Programmers would be hard pressed to access private functions/classes/data inside the library, and wouldn't be able to compile a bespoke version of the code for themselves. Thus giving you some of the benefit of microservices.

Does go and rust have tooling to allow for the distribution of compiled libraries? Or do you have to just use git sub modules to share compiled artifacts?

C and C++ just force you to distribute DLLs - which I suppose you can do by pushing DLLs to a git submodules and have users access them when they compile them.

This is a document I'd like to keep track of and update as comments come in. https://docs.google.com/spreadsheets/d/1bIcI5foZi-fDmTV4GJgjl_gKC7QJBsFT5gDNmtQ6V8k/edit?usp=sharing


  👤 sargstuff Accepted Answer ✓
> ... I'd like to know which languages support high modularity. Essentially which languages could you have separate teams work on plugins/libraries that could be used and those users would be forced to only use the public interfaces of the library. ...

> C and C++ just force you to distribute DLLs - which I suppose you can do by pushing DLLs to a git submodules and have users access them when they compile them. > > This is a document I'd like to keep track of and update as comments come in.

Without appropriate ways for team communication/interaction (documentation, requirements, interaction, programming environment, ways to provide feedback), modularity is meaningless to team(s).

on programming side: ide & source control are some ways this is done.

libraries are not the only way to distribute DDLs. -- uncompiled source code, by directory structure, modularity organized by stand alone programs, .h files, .c files, by project/program version, etc.