(My previous post was posted before mapi's post became visible due to new 
account moderation.)

> Only I used `require` for its name.

The three related keywords (`import`, `include`, and this proposed new one) 
should be easy to remember which is which.

  * `include` reminds people of C #include, and works the same way: [bluntly 
injecting](https://nim-lang.org/docs/tut1.html#modules-include-statement) code 
from another file without module distinctions.
  * `import` reminds people of Python, which isn't helpful due to different 
namespace behavior, but it's still easy to remember as "import **into 
namespace**".
  * `use` is probably the best keyword for "use module without importing into 
namespace" (that is require module prefix). `load` is close, but `use` is 
better.
  * `require` reminds people of PHP, where it's same as `include` except fail 
on error - yuck. Nim compilation should obviously error out with any of those 
keywords failing.



The same `use` vs `import` distinction is [used in 
Elixir](https://stackoverflow.com/questions/28491306/elixir-use-vs-import):
    
    
    # Import functions from Foo so they can be called without the `Foo.` prefix
    import Foo
    
    # Invokes the custom code defined in Foo as an extension point
    use Foo
    

Reply via email to