Rant after trying Rust a bit

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 23 12:50:38 PDT 2015


On Thu, Jul 23, 2015 at 12:49:29PM -0700, Walter Bright via Digitalmars-d wrote:
> On 7/23/2015 7:15 AM, Andrei Alexandrescu wrote:
> >>I am a bit puzzled by the notion of shipping template code that has
> >>never been instantiated as being a positive thing. This has also
> >>turned up in the C++ static_if discussions.
> >
> >This is easy to understand. Weeding out uncovered code during
> >compilation is a central feature of C++ concepts. Admitting you
> >actually never want to do that would be a major blow.
> 
> But if a unit test fails at instantiating it, it fails at compile
> time.

That assumes the template author is diligent (foolhardy?) enough to
write unittests that cover all possible instantiations...


T

-- 
People say I'm indecisive, but I'm not sure about that. -- YHL, CONLANG


More information about the Digitalmars-d mailing list