Skip to content

Distinguish Constants from Static Variables #107

@DavePearce

Description

@DavePearce

(see also RFC#0008)

Currently, constants are implemented as final statics. However, it may make sense to actually distinguish this. For example, we could have:

constant int x = 1
static int y = 2
final static int z = 3

Its not clear to me what the value of a final static would be. However, the key difference is that constants would not be inlined, and would not be usable in certain contexts. Observe that this distinction follows Rust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions