Skip to content

static keyword #2

@milutinovici

Description

@milutinovici

I think there is no need for a static keyword. For methods, distinction could be that instance methods have 1st this parameter, and static ones don't.

area(this) -> int32 {
    this.length * this.length;
}

Because this is already an implicit parameter in instance methods. This way it would be explicit.
I think rust is doing something similar.

static fields/properties.

Mutable static is bad, so it shouldn't be supported at all. This leaves static readonly which could just be const

Hope this helps

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions