sergiotaborda / lense-lang

The Lense Language Compiler
1 stars 0 forks source link

Immutability #29

Closed sergiotaborda closed 3 years ago

sergiotaborda commented 8 years ago

The language should allow for a keyword or annotation that represent the class is immutable. Its state does not change after creation. then the compiler should check if this is true. After compilation the class gains a Immutable trait so validations like

if ( a is Immutable) 

to be possible. Possible syntax is

public immutable class  SomeName {

}
sergiotaborda commented 3 years ago

Keywprd changed to mutable because immutabiloty is default