FlatLang / Flat

(Deprecated) Soon-to-be legacy Flat compiler all in one
6 stars 0 forks source link

Add named annotation/modifier for parameters #383

Closed BSteffaniak closed 7 years ago

BSteffaniak commented 7 years ago

e.g.

public myFunc(this named Int year = 0, this named Int month = 1, this Int dayOfMonth = 1) {}

Where when calling myFunc and passing a value for year and month, you would have to explicitly name them. Whereas this is currently possible: myFunc(2016, 12, 11), you would be required to explicitly specify the argument names: myFunc(year: 2016, month: 12, 11)

BSteffaniak commented 7 years ago

Also maybe shorthand by putting colon after type name in parameter?

public myFunc(this Int: year = 0, this Int: month = 1, this Int dayOfMonth = 1) {}

this would behave the same as the original example