Comment

Comment by nwg

> default argument values are a property of named functions, not of function types, and cannot be expressed in the type system.

For what reason? Isn't the gripe exactly with the fact that it's not implemented?

Also why are arguments required to be named in all calls after the first, but not the first?

func f(a: Int)(b: Int)(c: Int) -> Int { return a + b + c }

let v = f(2)(b: 5)(c: 5)

Stuff like this just eats at me when i use a language, especially when that language is brand new and other languages have had nice syntax for similar features for a long time.

parent nwg 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton