Overlapping functionality: IFTI, templates, is-expressions

Russell Lewis webmaster at villagersonline.com
Sat Mar 22 17:53:35 PDT 2008


Jason House wrote:
> Russell Lewis wrote:
> 
>> While I'm glad for the discussion about parsers, we lost track of the
>> original post.  What do people think of my suggestions:
>>
>> * Make IFTI and template-specialization syntax sugar for is-expressions
>> (in the right order so the deductions work properly)
> 
> Since templates could eventually span multiple modules, I don't know if one
> could simply write static if and is expressions to cover all functionality. 
> When limited to a single module, I think there should be a one to one
> mapping of some kind.

Do templates currently have the ability to span multiple modules?  With 
other types of symbols, this type of overloading isn't allowed (you have 
to use aliases to explicitly bring in overloads from other modules).  If 
templates are the same way, then we don't have a problem.

And just to shortcut the OT discussion...this type of overloading seems 
very wrong at first, but it is done by design because without it you 
face some really nasty problems with large programs.  It's a "this makes 
sense in hindsight design feature that we learned from C++."  Read 
previous (long) NG threads about it.



More information about the Digitalmars-d mailing list