Nathan-Wall / proto

A programming language derived from JavaScript which emphasizes prototypes, integrity, and syntax.
Other
12 stars 1 forks source link

Import paths #12

Closed jwerle closed 10 years ago

jwerle commented 10 years ago

What are the import paths? Do import declaration require a .proto extension ?

Nathan-Wall commented 10 years ago

Import paths are always relative to the file doing the importing.

Currently importing .pr and .js both work. When you import a proto module (.pr) you can retrieve its exports. When you import a JavaScript file, you can't currently access its exports. In the future, maybe we could support importing the exports of an ES6 script. Also I'd like to build in a full featured module loader system based on the one going into ES6 which would allow extending proto to support importing any arbitrary kind of file (coffeescript, etc.).

Nathan-Wall commented 10 years ago

18: Build out the module loading system