def example = enum {
OPTION_A,
OPTION_B,
};

Consider the following:

// In module "foo"
def example = enum {
OPTION_A,
OPTION_B,
};

// In user code
use foo;

let x = foo::example::OPTION_A;

Too verbose?

Show thread
Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml