3 ms·
I will generally have an "imports" type line at the top of my module, and then use the abbreviated name in the code. This is similar to Python's "from module i
by mckoss 16y ago
I will generally have an "imports" type line at the top of my module, and then use the abbreviated name in the code. This is similar to Python's "from module import name" pattern.
var library = namespace.com.foo.bar.baz;
...
var obj = new library.FooBar();
It's generally considered a best practice (in the Python community) to leave the external module name (like "library", above) so that someone reading your code can recognize which functions are external to your module, and which ones are local.
- calebmpeterson 16y agoThanks for the input!