Hacker News new | ask | show | jobs
by ddouglascarr 3899 days ago
Modules as views on this database of functions is genius.

Most of the problems that Joe talks about with modules go away if modules become just a mutable collection of functions, and functions can be in more than one module.

You can keep your cake and eat it too!

1 comments

Only if the relationship between functions needs to be a directed graph. If a strict tree with no cross connections is sufficient, then there should be no reason for two classical modules to share identical functions. The existence of such a function would suggest instead the need for a third module.

Considering the idea of functions that need a directed graph to describe their relationships makes it pretty obvious, at least to me, that it's a bad idea.