Skip to content
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

implement inc/dec as desugared magic #440

Closed
wants to merge 3 commits into from

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Jan 31, 2025

Tried to implement as template, doesn't work because the use of +/- needs a concept and concepts still seem to have some issues, even x = x does not work (will still look at these issues). Alternatively it could be an untyped template. In any case this is more faithful, could be revisited later.

A problem with this approach is that mutability checking has to be special cased for these magics as well as incl/excl, which is not done yet

@Araq
Copy link
Member

Araq commented Jan 31, 2025

A problem with this approach is that mutability checking has to be special cased for these magics as well as incl/excl, which is not done yet

Yeah, this solution is messy as too many steps of the pipeline then need to understand the IncX special case. We need a template for this as well as some way to say "eval once".

@metagn
Copy link
Collaborator Author

metagn commented Jan 31, 2025

Trying inline procs

@metagn metagn closed this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants