-
Notifications
You must be signed in to change notification settings - Fork 6
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
Question: Why do some primitives not overwrite formals? #103
Comments
The reason is simple. They were forgotten! |
Maybe to add a bit more context. One of my personal goals is to make the internals rather easy to contribute to. I've been iteratively cleaning up old primitives with little experiments to make it easier to do things like match arguments, populate default values, handle the call stack - among many other behaviors. It wasn't so much that they were forgotten, just that a lot of this development starts as an experiment. Instead of re-writing everything with each experiment, I usually start with just a few targeted implementations to stress test an idea before committing to it throughout the whole codebase. It's safe to say the experiment worked, so it's a good reminder to go back and flesh these all out. Thinking about it now, though... I think they could be made even simpler using something like the fn formals(&self) -> ExprList {
r! { (a = 1, b = 2, ...) }
} |
I think we don't want to directly use the |
Yeah, you're right, probably not exactly fn formals(&self) -> ExprList {
r_expr! { (a = 1, b = 2, ...) }
} is probably manageable. Not sure if I feel it's specialized enough to just call it |
I think this will be a good chance to familiarize myself with macros so I would love to give this one a try. |
For example,
c()
uses the defaultformals
method.Is this simply not implemented or is there more to it?
The text was updated successfully, but these errors were encountered: