Skip to content

Sugarcoat for constructing compound types #50

@MierenManz

Description

Copied from From #45

NeKzor

I have another idea for declaring sized arrays. How about mapping a tuple to SizedArrayType/ArrayType or maybe even TypedArray?
Here is an example:

new Struct({
    foo: [u8, 100], // length 100
});

MierenManz

I've considered stuff like this in the past and eventho I really like how much cleaner it is compared to new SizedArrayType(u8, 100). I am conflicted if this magic is something we should want for the library.

MierenManz

Maybe this is something we could do with decorators so that the magic spaghetti for it would be in a optional decorator somehow?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions