#import directive is specific to the LIGO compiler. It provides
the support for a minimal module system.
Namespaces get more handy when they can be made from a file, separate from our own program, like a library: when we import a namespace from such a file, we automatically obtain a namespace encapsulating all the definitions in it. This will become very handy for organising large contracts, as we can divide it into different files, and the namespace system keeps the naming space clean (no need for name mangling).
Generally, we will take a set of definitions that can be naturally
grouped by functionality, and put them together in a separate
file. For example, we can create a file
In another file, we can import
euro.jsligo as a namespace, and use
its definitions. For example, we can create a
imports all definitions from
euro.jsligo as the namespace