hard typdef - proposal - I know it's not in the standard
Jonathan Wakely
jwakely.gcc@gmail.com
Thu Jan 24 18:45:00 GMT 2013
On 24 January 2013 16:21, Alec Teal wrote:
> That's because this has nothing to do with objects, in the paper that was
> linked (called "strong typing") it implemented new types rather like
> objects, "using score = public int { //definitions }; for example,
> "extending an int" effectively, this is what I mean by a PHP-noob going
> class-mad.
I think you've misunderstood the proposal. The syntax you refer to
defines a strong typedef for int and defines an overloaded operator
for it, it doesn't go class-mad and has nothing to do with PHP or
"everything is a class". It would add no overhead over an int either,
if implemented sensibly, it would only have compile-time properties
and not alter runtime behaviour. Reel in the hyperbole.
More information about the Gcc
mailing list