Skip to content

Syntax sugar to assigning a constructor argument to an instance variable and to add the keyword this (or self) #187

Description

@igotfr

Alternative 1, like Dart:

class Point
  var x: F64
  var y: F64

  new create(this.x, this.y)

Alternative 2, like Python, Typescript

class Point
  new create(var this.x: F64, var this.y: F64)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions