Hacker News new | ask | show | jobs
by Lerc 1037 days ago
I couldn't see any reference to default parameters. Are they a thing?

I would quite like the ability to have something like

func makeBox(width: Int = 100, height: Int = width) -> BoxThing

everything else I've seen, I like the look of. One of my litmus tests for languages is to have the ability to make decent Vector types, tuples and operator overloading should perform that function nicely.

1 comments

`default parameters` and some local features will be elaborated later on. We make the big(non local) features first and add various nice sugars step by step.