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

Iftype conditions (RFC 26) #1855

Merged
merged 1 commit into from
Apr 21, 2017
Merged

Iftype conditions (RFC 26) #1855

merged 1 commit into from
Apr 21, 2017

Conversation

Praetonus
Copy link
Member

These new conditions allow programmers to get information on subtyping relationships of type parameters at compile time to conditionally compile code.

Most of the work is done during the scope pass, where the definition assigned to a type parameter reference differs based on whether the reference occurs in the then clause of an iftype condition.

This change implements only a part of RFC 26. Method specialisation is still to be implemented.

@Praetonus Praetonus added the changelog - added Automatically add "Added" CHANGELOG entry on merge label Apr 21, 2017
Copy link
Member

@jemc jemc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

Looks good, but don't we need to regenerate pony.g based on the updates in parser.c?

@Praetonus
Copy link
Member Author

@jemc That's right, I'll add that.

These new conditions allow programmers to get information on subtyping
relationships of type parameters at compile time to conditionally
compile code.

Most of the work is done during the scope pass, where the definition
assigned to a type parameter reference differs based on whether the
reference occurs in the then clause of an iftype condition.

This change implements only a part of RFC 26. Method specialisation is
still to be implemented.
@SeanTAllen
Copy link
Member

@Praetonus i didn't detail this in the release notes. i'm saving that til all the functionality and documentation is done, however, i am going to have an item about this in "last week in pony" so the adventurous could start trying it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - added Automatically add "Added" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants