IFTI
Jari-Matti Mäkelä
jmjmak at utu.fi.invalid
Fri Nov 9 09:29:28 PST 2007
Regan Heath wrote:
> Jari-Matti Mäkelä wrote:
>> BCS wrote:
>>
>>> Reply to Bill,
>>>
>>>> Kirk McDonald wrote:
>>>>
>>>>> Bruce Adams wrote:
>>>>>
>>>>>> Okay, I give up. I've been trying to figure out what this FLA stands
>>>>>> for since I first saw it turn up a few threads ago. Someone please
>>>>>> put me out of my mystery. IMHO IIOTMCAG. <- LAAEFTR
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Bruce.
>>>>>>
>>>>> Implicit Function Template Instantiation
>>>>>
>>>>> The ability to, given a function template:
>>>>>
>>>>> void foo(T)(T t) {}
>>>>>
>>>>> Call it without explicitly providing the types of the arguments:
>>>>>
>>>>> foo(12);
>>>>> foo("apples");
>>>> I think in C++ land they get by just calling it "implicit
>>>> instantiation", right? Anyone been around here long enough to know
>>>> why D has it's own acronym for this?
>>>>
>>>> --bb
>>>>
>>> I think the "Function Template" comes from the fact that it is just for
>>> function templates. Either that or because "implicit instantiation" is
>>> to long and II is to ambiguous.
>>
>> Hmm, you could extend it to classes too:
>>
>> class Foo(T) {
>> this(T t) { }
>> }
>>
>> void foo() {
>> auto bar = new Foo(5);
>> }
>
> So lets drop the F, IFTI -> ITI (Implicit Template Instantiation).
I'm not saying we should get this feature. :) Just wanted to point out there
are some arbitrary limitations in D that are not necessarily needed. Not
sure if this is one of those without further research.
More information about the Digitalmars-d
mailing list