-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Real preprocessing support #259
Comments
I prefer improving the existing preprocessing over using C's preprocessor, C's preprocessor is slow and uses bad semantics for file management. What is the problem you are trying to solve that the current preprocessing is not sufficient for? |
Adept is lacking a lot of commonly used data structures and I'm such an idiot that I can't implement them myself. So, I can only try using readily made libraries for C, and these libraries are always using C macros heavily. |
I am very busy with other projects at the moment, so it might be a long time, if ever, before they are implemented To implement containers though, I assume the only thing you're missing is the ability to have different subtypes? You can create containers like this for example:
where you can accept polymorphic type parameters (like $A) which can take on any type. Then you supply the types you want when you use the type like: And functions/methods use same polymorphic types in the same way pretty much:
just like C++ templates. If you have any specific container requests though I can try to take a look The lifetime management of elements is the hard part to get right though since the current lifetime system sucks |
Most of C libraries used macros heavily, especially container libraries for C. Adept already included
gcc.exe
with itself so I think usinggcc -E
for preprocessing is not a big deal for you.The text was updated successfully, but these errors were encountered: