-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modules? #19
Comments
And a standard library? |
Yep. |
Speaking of which, how are libraries going to work in Haumea? I suppose they will be C-like (i.e. separate header file and compiled code) but is there any syntax for function forward-declarations yet? |
I have no clue. :P I've just been making issues for things that I want to add eventually.
I don't know and no. |
As haumea is a compiled language, I think C-like libraries are a good option, because that also introduces precompiled files for modularized programs, which makes compilation times much much shorter. The problem, of course, is that the concept is just a little arcane for those new to programming (I, in fact, only really understood the point of C header files a few months ago, when I started programming C seriously) Maybe haumea could treat all files like header files (that is, read the function prototypes from their defining files), and then use a precompiled binary if one was available? (sort of like an automatic makefile system) |
I'd say just cache things in |
import foo /* defines and imports module "foo" [object/dict, will need this datatype] */
import bar as baz /* imports module "bar" but defines it as "baz" */ |
Also this may need some sort of repository - like npm or Cargo - with a CLI (and perhaps website). We could base it off of GitHub.. # installs https://github.com/nanalan/somemodule.git as module
$ haumea install nanalan/somemodule
$ touch hello.hau
$ echo "import nanalan/somemodule as somemodule" >> hello.hau
$ haumea run hello.hau # bam! But this is a far-off thing. |
I was actually thinking about using
|
As far as a repository goes, we could definitely use Github, at least for the first version. I would like to make a separate repository eventually, since that would make it far easier for users to find packages. |
Moving to haumea-lang/thinktank |
I would be nice to allow people to write modules in Haumea. This would make the language much more usable for real word stuff and for learning programming in.
The text was updated successfully, but these errors were encountered: