Hacker News new | ask | show | jobs
by dgb23 1615 days ago
> It may be a bit annoying to create many small files, but modules have the same fundamental functionality as namespaces without the potential downsides.

Do they?

It seems to me that namespaces are more powerful and convenient than JS modules as they enable more structure.

I have only dabbled in TS and am not sure how useful they are there. But I assume they would be similar to PHP/C#/Clojure namespaces on a conceptual level.