Skip to main content

Questions tagged [modules]

For questions about design and implmentation of module systems in programming languages. Do not use for questions about using a module within an existing language.

Filter by
Sorted by
Tagged with
6 votes
5 answers
2k views

How do languages where multiple files make up a module handle combining them into one translation/compilation unit?

Mainly, I want to know what existing languages/implementations that use this sort of multi-file module structure do. In my language, modules can consist of multiple files. (For now I don't plan on ...
texdr.aft's user avatar
  • 313
6 votes
1 answer
201 views

What's the benefit of using different tokens for accessing nested namespaces/modules versus properties?

In JavaScript, accessing items from a module is done using ., e.g. moduleBar.moduleFoo.functionFoo, which looks exactly the same ...
Lazar Ljubenović's user avatar
11 votes
1 answer
734 views

Typeclasses, traits, interfaces, protocols: is there any consistent terminology?

Many languages have some form of expressing "user-defined duck typing": defining a type by its behavior, rather than anything about the structure or data of an instance of the type itself. ...
apropos's user avatar
  • 1,236
7 votes
1 answer
192 views

What are the advantages and disadvantages of package declarations?

Java-family languages often use a package declaration at the top of a source file, to group source files into modules/packages independently of their file system ...
Ginger's user avatar
  • 2,649