Skip to content

Create Parameter type without specifying a name #17

@ChrisRackauckas

Description

@ChrisRackauckas

It would be nice to be able to do:

p = @with_kw type # could also be immutable
    a::Int = 6
    b::Float64 = -1.1
    c::UInt8
end

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions