[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++
From: |
Michal Suchanek |
Subject: |
Re: C++ |
Date: |
Mon, 9 Nov 2009 14:20:07 +0100 |
2009/11/9 William Leslie <address@hidden>:
> The unfortunate thing about C++ templates in relation to the
> polyinstantiation that languages like some ML dialects implement
> (besides the unintelligible error messages, which are the deal breaker
> for me) is that they really are compile-time code generation. The
> problem is that the template has to be /included/ in any using code.
> This means that two compilation units that use minimum<int> will each
> have their own instance of it.
>
> It seems like it would be difficult to reason about how much
> duplication would occur in a largeish project. Worse, because you
> can't put them into a library and have template parameters resolved at
> link time, changes to templates require rebuilding all the code that
> uses them. It's a very inconvenient way to achieve code reuse IMHO.
>
It's the same as #defines, it's just intelligible syntax for them. And
having intelligible syntax is an advantage IMHO.
Thanks
Michal
- Re: C++, olafBuddenhagen, 2009/11/03
- Re: C++, William Leslie, 2009/11/04
- Re: C++, Jonathan S. Shapiro, 2009/11/04
- Re: C++, Bas Wijnen, 2009/11/05
- Re: C++, olafBuddenhagen, 2009/11/08
- Re: C++, Bas Wijnen, 2009/11/09
- Re: C++, William Leslie, 2009/11/09
- Re: C++,
Michal Suchanek <=
- Re: C++, Bas Wijnen, 2009/11/09
- Re: C++, Jonathan S. Shapiro, 2009/11/09
- Re: C++, Sam Mason, 2009/11/09
- Re: C++, Jonathan S. Shapiro, 2009/11/09
- Re: C++, Sam Mason, 2009/11/09
- Re: C++, Lluís, 2009/11/11
- Re: C++, Jonathan S. Shapiro, 2009/11/09
- Re: C++, olafBuddenhagen, 2009/11/10