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

allow splatting in calls to new #30577

Merged
merged 2 commits into from Feb 7, 2019
Merged

allow splatting in calls to new #30577

merged 2 commits into from Feb 7, 2019

Conversation

JeffBezanson
Copy link
Sponsor Member

@JeffBezanson JeffBezanson commented Jan 3, 2019

This allows the core NamedTuple constructor to be defined without generated functions.
With a bit of work in the front end it will also allow splatting inside new in general, which is kind of a neat feature. Done!

Unfortunately this does not yet do much for named tuples of Unions, but it's heading in the right direction.

@Keno
Copy link
Member

Keno commented Jan 4, 2019

You'll want to teach SROA about this also

@JeffBezanson
Copy link
Sponsor Member Author

I hoped it would be enough to inline this to a normal :new expression when the length is known, and otherwise just let it be slow. Is there something else I should do more specifically?

@Keno
Copy link
Member

Keno commented Jan 4, 2019

Yeah, I guess that's ok for now. There's fancier things one could do of course, but maybe that's future work.

@JeffBezanson JeffBezanson changed the title RFC: add splatnew form; like new but accepts a tuple allow splatting in calls to new Jan 4, 2019
@JeffBezanson JeffBezanson force-pushed the jb/splatnew branch 4 times, most recently from d3729f9 to c2cb02e Compare February 6, 2019 19:47
@JeffBezanson JeffBezanson merged commit 2ecc499 into master Feb 7, 2019
@JeffBezanson JeffBezanson deleted the jb/splatnew branch February 7, 2019 17:32
lcw added a commit to lcw/TypedTables.jl that referenced this pull request Mar 19, 2019
The workaround for JuliaLang/julia#29970 causes newer versions of Julia
to hang in the precompilation step for TypedTables.

Since JuliaLang/julia#29970 has been addressed in JuliaLang/julia#30577
the code is avoided in newer versions of Julia.
chakravala added a commit to chakravala/julia that referenced this pull request Apr 4, 2019
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.

None yet

2 participants