Re: Inheritance
From: Tim (timp33_at_YAH00.COM)
Date: 02/18/05
- Next message: Vaughn Treude: "Can't read from HID device"
- Previous message: Calvin Guan: "Re: OK to block thread?"
- In reply to: Maxim S. Shatskih: "Re: Inheritance"
- Next in thread: Mark Roddy: "Re: Inheritance"
- Reply: Mark Roddy: "Re: Inheritance"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 18 Feb 2005 12:19:40 -0800
The real value in using C++ for this sort of thing is that you can define a
"type" whose semantics are enforced by the compiler. A variable whose use
requires InterlockedXXX() probably has a whole host of other
requirements/anti-requirements. Such a variable should probably never be
bit-shifted, nor multiplied, etc. Thus, a non-trivial "__interlocked" type
should cause the compiler to error if any of these forbidden operations are
accidentally applied to a variable of that type. And whereas we all could
never agree on the complete set of acceptable/forbidden operations on such a
type, C++ allows me to define mine, and you yours.
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:#FyTZ9EFFHA.2600@TK2MSFTNGP09.phx.gbl...
> The toy examples like using "operator++" for InterlockedIncrement mean
> literally nothing in real work. Nothing.
- Next message: Vaughn Treude: "Can't read from HID device"
- Previous message: Calvin Guan: "Re: OK to block thread?"
- In reply to: Maxim S. Shatskih: "Re: Inheritance"
- Next in thread: Mark Roddy: "Re: Inheritance"
- Reply: Mark Roddy: "Re: Inheritance"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|