Skip to content
This repository was archived by the owner on Feb 3, 2020. It is now read-only.
This repository was archived by the owner on Feb 3, 2020. It is now read-only.

Limited const declarations #62

Description

@sunjay

We already have the ScopeItem variants to support this for basic constant values (like booleans), byte literals and numbers. We could add a feature similar to what Rust has for const declarations. These are values with no memory address. They get inlined during compilation. They must have a declared type.

const foo: u8 = 17;
const bar: [u8; _] = b"bar spam";
const DEBUG: bool = false;

These const declarations would support very limited code on the right-hand side (literal values only for now).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions