[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-users
Subject:    Re: [Boost-users] boost any questions and praise
From:       Alan Tennant <alan2here () gmail ! com>
Date:       2010-01-31 17:09:40
Message-ID: a557f5fb1001310909i18c97007kb4f4bf73b2b61b5f () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@gmail.com> 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.
>

[Attachment #5 (text/html)]

and std::vector is even more type safe, but even less useful.<br><br>I think the term \
&quot;type safe&quot; having the word &quot;safe&quot; in it was created by it&#39;s \
supporters, it&#39;s as biased as a term as &quot;strongly typed&quot;.<br>

<br>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.<br>

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

<br>Maybe there should be a fixed number of types, like in the original C with no \
objects, then it would be totally safe.<br><br><br><div class="gmail_quote">On 31 \
January 2010 16:26, Igor R <span dir="ltr">&lt;<a \
href="mailto:boost.lists@gmail.com">boost.lists@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">&gt; Variant seems \
functionally inferior to Any, the big&#39;y being that you need to know all the types \
in advance.<br>


<br>
</div>It&#39;s not inferior but superior, as it allows \
type-safety.<br></blockquote></div>



_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic