Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of
Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of
- Subject: Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of
- From: Laurence Harris <email@hidden>
- Date: Thu, 8 Feb 2007 03:45:04 -0500
On Feb 8, 2007, at 2:09 AM, Chris Page wrote:
A few points from a pedant, since nobody mentioned this:
1. Never use explicit casts unless you absolutely must. They can
silently throw away type information.
2. Never use C-style casts in C++, they always silently throw away
type information.
Even worse, sometimes they just outright lie to the compiler. I've
seen more than one person post code that didn't work because it
contained a cast that was simply not valid, such as casting a
DialogRef to a WindowRef.
Larry
3. If you must perform an explicit cast and you're using C++, use
the verbose, more specific casts like static_cast<>. If you
absolutely must, use reinterpret_cast<> instead of C-style casts to
make it obvious where you're overriding type information.
4. Periodically try removing casts, especially reinterpret_cast<>,
to see whether they're actually necessary—remove them if they are not.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden