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

Use property interface #95

Merged
merged 2 commits into from
Feb 20, 2019
Merged

Use property interface #95

merged 2 commits into from
Feb 20, 2019

Conversation

tkf
Copy link
Contributor

@tkf tkf commented Feb 19, 2019

fixes #49

A part I didn't touch is:

ns = fieldnames(T)
args = []
for (i,n) in enumerate(ns)
push!(args, pop!(di, n, getfield(pp, n)))
end

in reconstruct. I think it's better as-is. What do you think?

@mauro3
Copy link
Owner

mauro3 commented Feb 20, 2019

Thanks! Yes, reconstruct should be left as is.

Do you have any idea on how properties should interact with the @unpack_MyType macros? If at all.

@mauro3 mauro3 merged commit 8838f91 into mauro3:master Feb 20, 2019
@tkf
Copy link
Contributor Author

tkf commented Feb 21, 2019

I guess "don't"? It seems properties are too dynamic to interact with static construct like @unpack_MyType. But to be honest I don't use @unpack_MyType myself so I don't have a good intuition when it'd be useful.

@mauro3
Copy link
Owner

mauro3 commented Feb 21, 2019

Yes, same here. I thought I'd check.

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.

Pack/unpack should use getproperty instead of getfield
2 participants