Proposal: Private modules (general discussion)

Hm… Interesting, I didn’t think of it, but it’s a pretty good idea.

In this case, expose would be great! you call expose to expose your private module and then do whatever you want with it. You can require it, import it or use it :slight_smile:

I think you should either add export and nothing else OR add all four aliasp, requirep, importp and usep. Both are interesting extremes. The former adds a new concept, which is to expose a normally hidden module. The you can do whatever you want with that module. The latter adds a more succint API to work with private modules as if they were public.

After your remark I prefer expose.

EDIT: and you could probably perform all kinds of async deferred error checking on expose if you want, as you were proposing with aliasp

2 Likes