Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Convenient syntax for merging #14

Open
davidanthoff opened this issue Aug 21, 2016 · 1 comment
Open

Convenient syntax for merging #14

davidanthoff opened this issue Aug 21, 2016 · 1 comment

Comments

@davidanthoff
Copy link
Collaborator

It would be great if the folllowing syntax would work for merging NamedTuples:

nt1 = @NT( a=>1, b=>2, c=>3 )
nt2 = @NT( d=>4, e=>5)
@NT(nt1..., f=>"something else",nt2...)

would construct a NamedTuple (a=>1,b=>2,c=>3,f=>"something else",d=>4,e=>5).

@davidanthoff
Copy link
Collaborator Author

@JeffBezanson I tried to implement this by starting to make merge of NamedTuples type stable, but I'm running into JuliaLang/julia#16806. Currently one can't use the @NT macro in the quoted expression of a generated function on julia 0.5 because the @NT macro calls eval to create the type for the named tuple, but using eval inside a generated function throws an error in julia 0.5 (not on 0.4). Any chance that regression might get resolved at some point?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant