2 ms·
How can the language force good design? Like how would a language that uses explicit exports stop someone exporting everything? I agree that accessing librari
by maxerickson 11y ago
How can the language force good design?
Like how would a language that uses explicit exports stop someone exporting everything?
I agree that accessing libraries indirectly probably isn't useful, but I think being able to do dir(lib) and see the namespace that is in use is a good thing (at least in the context of Python).
- andreasvc 11y agoThe language cannot force it but can encourage it. Having to make the choice between private and public is worthwhile I think. > being able to do dir(lib) and see the namespace that is in use is a good thing. It is, but it is most useful when what you get a curated list of members (__all__) intended to be public.