Boost logo

Boost :

From: Gabriel Dos Reis (Gabriel.Dos-Reis_at_[hidden])
Date: 2001-01-26 13:02:44


"Peter Dimov" <pdimov_at_[hidden]> writes:

| From: "David Abrahams" <abrahams_at_[hidden]>
|
| [about the equivalence of class/function template partial spec]
|
|
| > Wow, that's a terriffic simplification if it works -- like proving
| Fermat's
| > theorem in terms of hyperbolic geometry (but far easier to check) ;-)
| > I'd love to hear from Peter Dimov whether he believes this fits the bill.
|
| Yes... and no.
|
| This is a good point, one I'm trying to get across. Once you have the
| partial specializations defined, there is absolutely no difference between
| the class and function templates in respect to specializations.

Adding just "function template specialization" shouldn't be that hard.
Having that feature working properly -- with respect to the least
surprise, e.g. not breaking user code semantics -- with the rest of
the language is far, far from trivial. I've seen no proof that is a
pure extension, but I've seen repeat assertions that it is, of course
without any hint of proof.

[...]

| Then there are the psychological reasons.

Not just psychological reasons -- even thought they are far important.

There are the issue that the only serious proposal I've seen containes
cases where it breaks in a very subtil way, user programs.

| ... Surprisingly few people
| distinguish overloads from specializations, and adding partial
| specializations is not going to help. :-) On the other hand, people
| routinely call overloads "partial specializations" without knowing that this
| thing doesn't exist

There are good reasons not to add to the confusion :-)

Well, before I get qualified a "biggot", I would like to make it
clear that I'm interessed in discussing formal proposal, not just
statement that something not clearly defined is a pure extension.

-- Gaby


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk