"self" keyword
Joe Buck
Joe.Buck@synopsys.com
Thu Jun 14 17:33:00 GMT 2012
It only saves one character in any case: your "self" is just "*this".
________________________________________
From: gcc-owner@gcc.gnu.org [gcc-owner@gcc.gnu.org] on behalf of Ian Lance Taylor [iant@google.com]
Sent: Thursday, June 14, 2012 10:19 AM
To: Rick C. Hodgin
Cc: gcc@gcc.gnu.org
Subject: Re: "self" keyword
"Rick C. Hodgin" <foxmuldrster@yahoo.com> writes:
> I was thinking C and C++.
>
> int myclass::foo(int a)
> {
> // recursion
> self(a + 1);
> }
>
> Just out of curiosity, why wouldn't it be accepted back into mainline?
In general these days GCC discourages language extensions. They would
have to have a compelling advantage. I don't see that here. Even if I
did, I would recommend running it through a language standards body
first.
Ian
More information about the Gcc
mailing list