Having default parameters seems like overloading, which at least to me, is not
all that desirable (when avoidable).
Is it that hard to do:
fn f(a : int, b : int) -> int {
…
}
fn f_s(b : int) -> int { f(10, b) }
You get the default param behavior, without the magic of overloading, and it is
clear from application what you are doing. This costs one line of code, and
having a separate name for the defaulted version…
On Aug 4, 2012, at 2:28 PM, Patrick Walton wrote:
> On 08/04/2012 11:20 AM, Matthieu Monrocq wrote:
>> Verbose.
>>
>> -- Matthieu
>
> Perhaps, but we can write macros for most of this.
>
> In general, I'd like to see whether we can avoid adding new features at this
> stage; the language complexity budget is pretty strained.
>
> Patrick
>
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev