We may need to define extensions for optimization purposes though.
As an aside, defm may help, by ensuring that certain variables always belong to certain types (although the other problem is with regards to . rest arguments). Really, having an optional type declaration is good, and helps make it easier for the compiler to optimize.
Looking through how Chicken compiler works, it seems that Chicken detects syntax-case and friends, performing them at compile-time, However if a macro needs to use a function, the function should be defined using define-for-syntax. Perhaps our rules for macros:
1. Should be defined using 'mac
2. Any form that has a 'mac will be executed at compile-time, with the 'mac transformed to a macro definition:
An extra hash argument can implement both optional and named args. Representing optional args as varargs would complicate the source transformation when they are used simultaneously in the same function.
It's not at all complicated: just make the last argument take the value of your temporary rest argument. Edit: This is what I did in creating the p-m macro, and it works.
I'm not sure how adding an extra hash would work well if I might pass several different functions, with different optarg names:
Edit: My approach appears to be somewhat similar to what pg did in the Scheme version - cref ac-fn, ac-complex-fn, ac-complex-args, ac-complex-opt in ac.scm
Since code is spec (grumble) I think it might be better to follow mostly what pg did, although I dunno, not sure ^^. How can passing in a hash table seamlessly emulate the same functionality while improving performance?
eval-when would be used, I think, only to differentiate between compile-time and run-time. It's not a part yet of ArcN. Hmm. Lemme think more deeply about this.
As an aside, both me and raymyers have written basic module systems.
The hardest part (which we haven't built yet) is macros, both private in the module, and macros defined by the module for use by external code/other modules.
Also, we can use Anarki-specific 'ssexpand and 'ssyntax to transform symbol syntax, probably by inserting another step in the compile process (which is why I suggested structuring arc2c in: http://arclanguage.com/item?id=5598 ); However ssyntax which transforms to ((compose a b) ...) has to be transformed to (a (b ...)) because of macros, such as p-m:def.
Yep. Just checked that. In fact, "debut.arc" was renamed "structs.arc". Just change this in "arc2c.arc", and it will be working.
1. Yes, I will probably. I only work with the Anarki version, so when I'm finding something useful in the source, I don't even know if it's "official" or not.
2. Yes. Using Anarki as a repository for the stable versions of arc2c seems a good idea.
Also, another question - Anarki has a CONVENTIONS file, will we be following this too? One Anarki convention that isn't followed is with regards to tabs and indentation, is it OK to change the tabs to follow Anarki conventions or do you prefer the current indentation?
Oh, sure, I never really checked the CONVENTIONS file, but I think it's better to indent this way (it's the tradition after all:). I usually don't do it naturally because it's not the way I learnt it, but I guess I should follow the conventions anyway. So, OK, let's change the tabs.
Edit: after some time scanning through the code - it seems that arformh's time is measured, but arform's time is not. Or vice versa, I could've gotten confused.
Cref: rfnurl* and rfnurl2* . rfnurl* is "r", r is (defopr r ...), defopr is (... (defop-raw ...)), defop-raw is (... (save-optime ...))
rfunurl2* is "y", y is (defopr-raw y ...), defopr-raw doesn't add any code to the body: (fn ,parms ,@body)
ERROR: Write permission to sacado/arc2c denied to AmkG.
fatal: The remote end hung up unexpectedly
error: failed to push to 'git@github.com:sacado/arc2c.git'