sergiotaborda / lense-lang

The Lense Language Compiler
1 stars 0 forks source link

Imutability as default #76

Closed sergiotaborda closed 3 years ago

sergiotaborda commented 4 years ago

public mutable name : String? instead of public name string? {get; set; } and public name: String?

public mutable class Person { // forced mutable, because one property is mutable

  public constructor (
       public mutable name: String;  // mutable. meaning it as a set and a get
       public birthday : Date;  // immutable. it only has a get
  );
}