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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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