function overload on full signature?
Timon Gehr
timon.gehr at gmx.ch
Wed Nov 14 11:12:58 PST 2012
On 11/14/2012 06:43 PM, foobar wrote:
> On Tuesday, 13 November 2012 at 21:34:28 UTC, Rob T wrote:
>> I'm wondering why overloading has been implemented to only match on
>> the argument list rather than the full signature which includes the
>> return type? I know I would use it if it was available.
>>
>> I'm not requesting this to be a feature of D, I'm only asking why it
>> is not being done.
>>
>> --rt
>
> This is hardly a new idea. It was implemented in a few languages of the
> 70's and it proved to be adding complexity and generally not worth the
> trouble.
I guess they just were not doing it right then.
> No language nowadays bothers with this based on those past lessons.
Haskell.
> fromInteger 2 :: Float
2.0
More information about the Digitalmars-d
mailing list