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

rename expression heads for type definitions to match keywords #23157

Merged
merged 1 commit into from
Aug 7, 2017

Conversation

JeffBezanson
Copy link
Sponsor Member

No description provided.

@JeffBezanson JeffBezanson added kind:breaking This change will break code compiler:lowering Syntax lowering (compiler front end, 2nd stage) parser Language parsing and surface syntax labels Aug 6, 2017
Copy link
Member

@Sacha0 Sacha0 left a comment

Choose a reason for hiding this comment

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

superficially lgtm! :)

@ararslan
Copy link
Member

ararslan commented Aug 6, 2017

I don't suppose there's any way to deprecate the old expression heads? I know a couple packages are using eval(Expr(:type, ...)) to define types in a (horrifically ugly) way that works with 0.5-0.7 without depwarns, e.g. JSON and I think Compat.

@JeffBezanson
Copy link
Sponsor Member Author

Yes, I can deprecate that particular use pattern.

@JeffBezanson
Copy link
Sponsor Member Author

Done. While I'm at it, I also changed the parsed representation to match the order that the subexpressions appear in the source.

NEWS.md Outdated
@@ -35,6 +35,13 @@ Language changes
* Nested `if` expressions that arise from the keyword `elseif` now use `elseif`
as their expression head instead of `if` ([#21774]).

* Parsed and lowered forms of type definitions have been synchronized with their
new keywords ([#23157]). Expression heads are renamed as follows:
`type` => `struct`
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps add *s on this list with 4 space indent to render it as a bullet list? Current rendering looks a bit funny https://github.com/JuliaLang/julia/blob/acadf3acb6054adb657d6a9390616f2c1e792546/NEWS.md#language-changes

@JeffBezanson JeffBezanson merged commit dc81931 into master Aug 7, 2017
@JeffBezanson JeffBezanson deleted the jb/typedefexprs branch August 7, 2017 03:08
@ararslan ararslan added kind:deprecation This change introduces or involves a deprecation and removed kind:breaking This change will break code labels Aug 7, 2017
martinholters added a commit to HSU-ANT/ACME.jl that referenced this pull request Aug 29, 2017
...that automatically use the correct expression head to deal with
JuliaLang/julia#23157.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:lowering Syntax lowering (compiler front end, 2nd stage) kind:deprecation This change introduces or involves a deprecation parser Language parsing and surface syntax
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants