-
Notifications
You must be signed in to change notification settings - Fork 31
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
Create Parameter type without specifying a name #17
Comments
I guess that would be a poor man's named tuple. See https://github.com/blackrock/NamedTuples.jl, JuliaLang/julia#16580. Could be useful. But you're example would error as |
Yeah, I assume it would error without a default. |
NamedTuples are immutable like tuples, right? That would make the "anonymous immutable" the same, but the "anonymous type" would be different. |
Maybe a struct like in JuliaLang/julia#16580 is really the right thing for my application. |
Yep JuliaLang/julia#16580 will be well cool to have. Well, I don't have a use for this but would accept a PR (if it doesn't add too much complexity). |
Closing this because the struct would be a better idea. |
It would be nice to be able to do:
and have it silently create a parameter type and return and instance of that type. The tool for doing this is described here: http://stackoverflow.com/questions/39485715/julia-design-silently-defining-naming-types-in-macros/39493415?noredirect=1#comment66311481_39493415. This could be helpful when all you care about is getting a type for its fields, but don't plan on making it again (and it's easier than coming up with arbitrary names all the time).
The text was updated successfully, but these errors were encountered: