The introduction of the library system was a great addition which basically turned C2 from an interesting toy that proves some improvement concepts to an interesting usable language. However, there could be some tiny additions make it easier to work with:
2.1 Allow targets to specify additional, perhaps local to the project, C2 libs directory. In C and C++, it is also common to have more include paths, so allowing something like this:
target trg
$generate-c
$libdir ./myotherinterfacefiles
file1.c2
file2.c2
end
could be a great addition to the library system.
2.2 Ability to recognize a prefix in in .c2i files. When there is a header that exposes the following functions:
void thislib_function1();
void thislib_function2();
void thislib_function3();
Then typing it as thislib.thislib_function1(); in C2 is not nice on the eyes. My suggestion is to the use of a prefix value in the toml manifest file for the library in the following manner:
//manifest file for the thislib
[library]
language = "C"
prefix = "thislib_"
[[modules]]
name = "thislib"
header = "thislib.h"
//thislib.c2i
func void thislib_function1();
func void thislib_function2();
func void thislib_function3();
In other words, the .c2i files would still contain the prefix, but when used in C2 code, one would use thislib.function1(); which is shorter and more sane.