Skip to content

Make type aliases to scalar types pass-by-value #1066

Description

@Kronos3

If you specify a type alias:

type SomeAlias = U8

All it's codegen-ed uses will be const SomeAlias& which may be inefficient. This is probably optimized out by the compiler though it would be good to get some feedback on a "good practice" in this case.

At the very least it improves readability since using TypeAlias = U8 in C++ typically just means rename and programmers would not change the pass-by-ref/pass-by-value semantics of function signatures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code generationIssues related to code generation

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions