fmease / lushui

The reference compiler of the Lushui programming language
Apache License 2.0
5 stars 0 forks source link

Named parameters #41

Open fmease opened 3 years ago

fmease commented 3 years ago

It's not clear whether we should support named arguments apart from record fields. But since we'd already have the infrastructure, it's very easy to add. The only thing left is the design point regarding the declaration of named parameters. For the longest time, I have envisioned:

alpha (let gamma: Int) (let delta: Text): Int = gamma

beta: Int = alpha (gamma = @Int 15) (delta = "delta")

As you can see, the current proposal (re-)uses let for the declaration. Obviously, field and let would be mutually exclusive on parameters.

The MVP does not include reordering actually!