Boost logo

Boost Users :

Subject: Re: [Boost-users] boost any questions and praise
From: Alan Tennant (alan2here_at_[hidden])
Date: 2010-01-31 12:09:40


and std::vector is even more type safe, but even less useful.

I think the term "type safe" having the word "safe" in it was created by
it's supporters, it's as biased as a term as "strongly typed".

If some code is getting an object then that code already knows why it is
requesting that object and what it will do with the object, what methods it
would make sense to call on the object, what methods might not be available
and the such.

If there were no recursive functions, or objects, no flow control like "for"
or "while" available, nothing like a code type either that would allow you
to abstract a loop, then your program would be guaranteed "loop safe" and
"lockup safe".

Maybe there should be a fixed number of types, like in the original C with
no objects, then it would be totally safe.

On 31 January 2010 16:26, Igor R <boost.lists_at_[hidden]> wrote:

> > Variant seems functionally inferior to Any, the big'y being that you need
> to know all the types in advance.
>
> It's not inferior but superior, as it allows type-safety.
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net