Skip to content

DOL v0.7.2

Choose a tag to compare

@ardeshir ardeshir released this 15 Jan 20:39

Breaking Change

Replace self. with this. in method bodies for instance self-reference.

Features

  • Add this keyword for instance self-reference (DOL 2.0)
  • Add Expr::This AST variant with full compiler support
  • Update all example files to use this.field/this.method() syntax
  • WASM compiler stub for this (full support coming later)

Design Rationale

Chose this over self because:

  1. Differentiates DOL from Rust's self conventions
  2. Broader familiarity (JS, Java, C++, C#, TypeScript)
  3. Emphasizes genes as domain objects, not implementation structs

Note: Self remains as the type-level self-reference (standard convention).

Migration

- self.value
+ this.value

- self.method()
+ this.method()