Kipper-Lang / Kipper

The Kipper programming language for Browsers and Node.js 🦊✨ Made at HTL Leonding & JKU Linz
https://kipper-lang.org
GNU General Public License v3.0
26 stars 4 forks source link

[Feature] Add full interface support for defining interfaces and checking against given types #527

Closed Luna-Klatzer closed 1 month ago

Luna-Klatzer commented 2 months ago

Is there an existing proposal for this?

This feature does not exist in the latest version

Proposal

Add full interface support which allows the user to define interfaces and match objects against them.

For example:

interface X {
  x: num;
  y: num;
}

var x: X = {
  x: 1,
  y: 2,
};

This issue does NOT implement casts or conversions of objects but focuses solely on the support of defining an object with an interface type and letting the user provide constraints on variables or arguments that must have the specific object type.

Exact behaviour / changes you want

Luna-Klatzer commented 1 month ago

Already implemented by #525 and #526.