Replies: 2 comments
-
|
I am concerned that this is a drastic change with lots of call sites that need patching because the module name changes. An alternate approach is to keep the library as it is and add an In a c2 module, One could still import specific modules or import std and use the This approach is backwards compatible and allows us to test whether we like the new scheme or not. Incidentally, this is not very different from what Lerno did in C3: he has an 2 levels for module names does make sense: it helps encapsulate large functional blocks such as the parser, the analyser, etc. Regarding the speed with lots of symbols, we are going to need a hash table to accelerate symbol look up in the analyser. The varargs stuff should be builtin and not require importing anything. |
Beta Was this translation helpful? Give feedback.
-
|
It will be a huge patch. That's why i'll push it to a branch first so we can evaluate. Also i want to measure the extra time in analysing this |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the libc modules mirror the libc header files (stdio, stdlib, etc). This is not really nice, since people (me included) can never remember which modules/files to import/include and some weird artifacts like open/close not being in the same one.
One idea is to simply put all the libc functions in a 'std' module. This name is already used in many other languages for that purpose. If we want to keep the functions spread over multiple .c2i files, we would have to add that feature, since currently an interface module can only have a single file..
Beta Was this translation helpful? Give feedback.
All reactions