Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2002-02-21 10:49:17


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, February 21, 2002 12:10 PM
Subject: Re: [boost] More on auto

> From: "Fernando Cacciola" <fcacciola_at_[hidden]>
> > More and more I'm getting convinced that 'auto', as it is being
currently
> > shaped, is Evil.
> > I would much prefer a more expressive type deduction scheme.
> >
> > Consider this:
> [...]
>
> Do not focus on how a feature can be misused. All of them can.
>
>
Well, that would allow me to be a writer too .-)

So I can later on write about what not to do with the feature just as we
currently write about

not defining conversion operators in a class with a converting constructor.
not defining a trivial bool() operator but instead use boost's fancy bool
techniques.
don't add one by one items in a 'set' just to get them all sorted at the
end, use vector then sort,
etc...

I don't know...
C++ is truly flexible and it has always been the responsibility of the
programmer to be careful, but in practice, we end up inventing bulletproof
techniques and predecating other straightforward idioms in the name of
safety. Think about smart pointers. Think about new style casts.

I don't think that the very small increased complexity of requiring auto
declarations to have a type name are not worth the increased safety.
Don't you think it does improves safety a lot?

Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com


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