ianagbip1oti / ProC

Hawt new programming language
MIT License
4 stars 0 forks source link

Modules #17

Open ianagbip1oti opened 6 years ago

ianagbip1oti commented 6 years ago

optional: actual module system

@InitializeSahib are you able to expand on what this means? e.g., what features should it have, or not have? Is there any language you think gets it close to right?

initializesahib commented 6 years ago

by this i mean you should be able to import/export pieces of code as "modules", to be reused later. another feature that could be added onto this is a package manager and repository so you can share your modules with other people.

some languages that do modules right are python, node.js, ruby, etc. (i'm not saying these languages are good)

this is mainly to replace the C's convention of header files

ianagbip1oti commented 6 years ago

So, something like

import("my_cool_module")

that loads the functions defined in my_cool_module.proc is along the right rack?

initializesahib commented 6 years ago

yes, but it shouldn't be limited to just the current file

there could be a default search path (where the package manager installs them)

ianagbip1oti commented 6 years ago

Absolutely. The first step will be importing from a local project though. Package management is a whole other problem.

(And I've still got stuff to add before I add imports, like functions, haha)

initializesahib commented 6 years ago

obviously :)