aboutsummaryrefslogtreecommitdiff
path: root/notes/identifier_kinds.txt
blob: 3d4ebe4e6389e135745694c63c33d08d991055b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

How to distinguish between different types of identifiers
=========================================================

Currently:

    types:
        TitleCase
    constructors (including "type scoped functions"):
        new
        new_*
        from_*
    local variable OR field OR method:
        lowercase
        lower_case

Enum values also need a syntax:

        # use a prefix?
        val_*
        _*
        # use TitleCase like for types?
        EnumValue
        # use fully UPPERCASE?
        ENUM_VALUE

Should there be a distinction between variables and methods?
(Most languages use parentheses for this purpose, but slul-try2 doesn't.)

Should there be a distinction between local variables and fields?

    # a prefix?
    _field
    # allow only access via `this`?
    this.field
    # a sigill?
    %field