Safer casts

Yigal Chripun yigal100 at gmail.com
Tue May 13 04:54:20 PDT 2008


Janice Caron wrote:
> 2008/5/13 Yigal Chripun <yigal100 at gmail.com>:
>> <snip> Lots of stuff about inlining
> 
> Please don't confuse inlining with instantiation. This does not help
> the discussion.
> 
> Whether or not a compiler inlines a function or not is a decision made
> at the call site, however the function body must still exist elsewhere
> in the object file, in case other functions in other modules need to
> call it non-inlined.
> 
> If nothing calls it non-inlined, the linker should remove it when
> building the executable.
> 
> This has nothing whatsoever to do with template instantiation.
> Inlining may or may not happen with either functions or delegates, but
> it has no bearing whatsoever on the "to template or not" discussion.

you know, it's not easy to have two parallel conversations with two
different persons about almost the same thing, while one is is making
one point and another makes a different point.
concurrency is hard!!

Dee talks about inlining, and here I completely agree with you about:

 > Inlining may or may not happen with either functions or delegates,
 > but it has no bearing whatsoever on the "to template or not"
 > discussion.

for me the question is how a template parametrized on the entire
delegate (i.e. an alias) compares with a template parametrized on the
element type of the array (which is how I would have done this, I think)
in regard to the number of instantiations of both solutions. I'd like to
hear your explanation comparing the two.

Thanks for your patience (is this spelled right?)

--Yigal



More information about the Digitalmars-d mailing list