Jump to page: 1 2
Thread overview
Idea for getting rid of "static" on methods
Nov 30, 2007
Bill Baxter
Nov 30, 2007
Craig Black
Nov 30, 2007
Janice Caron
Nov 30, 2007
Bill Baxter
Nov 30, 2007
Matti Niemenmaa
Nov 30, 2007
Bill Baxter
Nov 30, 2007
Matti Niemenmaa
Nov 30, 2007
Robert Fraser
Nov 30, 2007
BCS
Dec 01, 2007
Christopher Wright
Dec 01, 2007
Matti Niemenmaa
Dec 02, 2007
BCS
Dec 03, 2007
Sebastian Beschke
Dec 01, 2007
Leandro Lucarella
Nov 30, 2007
Robert Fraser
November 30, 2007
Nobody likes how overused static is, so here's an idea for a syntax to replace it in one place where it is frequently seen.

Here it goes:

   (with out this) int my_method() {...}

badum -ching!

--bb
November 30, 2007
"Bill Baxter" <dnewsgroup@billbaxter.com> wrote in message news:fipjds$cft$1@digitalmars.com...
> Nobody likes how overused static is, so here's an idea for a syntax to replace it in one place where it is frequently seen.
>
> Here it goes:
>
>    (with out this) int my_method() {...}
>
> badum -ching!
>
> --bb

What are you joking about?  Did someone suggest getting rid of static?


November 30, 2007
On 11/30/07, Craig Black <cblack@ara.com> wrote:
> What are you joking about?

I'm sure he's joking. He's figured out that "with", "out" and "this" are all keywords, and when put together make a readable phrase. :) It's really quite clever, but I'd be surprised if it was a serious suggestion.
November 30, 2007
Craig Black wrote:
> "Bill Baxter" <dnewsgroup@billbaxter.com> wrote in message news:fipjds$cft$1@digitalmars.com...
>> Nobody likes how overused static is, so here's an idea for a syntax to replace it in one place where it is frequently seen.
>>
>> Here it goes:
>>
>>    (with out this) int my_method() {...}
>>
>> badum -ching!
>>
>> --bb
> 
> What are you joking about?  Did someone suggest getting rid of static? 

Not recently, but it always comes up top on the list of confusingly overused keywords.

I was just thinking about it a little because adding const(this) would kind of make static stick out.  I was trying to think of some way static on methods could be made more parallel with const(this).  Something like no(this) was the first thing that came to mind, but that's not a keyword so I went trolling through the keyword index to see if there was anything else suitable.  But the best I could come up with sounded more like a feeble attempt at humor than a real solution.

--bb
November 30, 2007
Bill Baxter wrote:
> Something like no(this) was the first thing that came to mind, but that's not a keyword so I went trolling through the keyword index to see if there was anything else suitable.

How about:

(!this)            int my_method() {...}
(!in this)         int my_method() {...}
(with !this)       int my_method() {...}
(!with this)       int my_method() {...}
(is !in this)      int my_method() {...}
(!is in this)      int my_method() {...}
(this !is in this) int my_method() {...}
(this is !in this) int my_method() {...}

Where in the latter two, the first 'this' of course refers to the method.

-- 
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
November 30, 2007
Matti Niemenmaa wrote:
> Bill Baxter wrote:
>> Something like no(this) was the first thing that came to mind, but that's not
>> a keyword so I went trolling through the keyword index to see if there was anything else suitable.
> 
> How about:
> 
> (!this)            int my_method() {...}
> (!in this)         int my_method() {...}
> (with !this)       int my_method() {...}
> (!with this)       int my_method() {...}
> (is !in this)      int my_method() {...}
> (!is in this)      int my_method() {...}
> (this !is in this) int my_method() {...}
> (this is !in this) int my_method() {...}
> 
> Where in the latter two, the first 'this' of course refers to the method.
> 

Now you're on to something!  Just tweak that last one slightly:

  (this is !in function) int my_method() {...}

Perfect!

:-P
November 30, 2007
Bill Baxter wrote:
> Now you're on to something!  Just tweak that last one slightly:
> 
>   (this is !in function) int my_method() {...}
> 
> Perfect!

Nah, this one's perfect:

(this function is !in this class) int my_method() {...}

-- 
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
November 30, 2007
Matti Niemenmaa wrote:
> (this is !in this) int my_method() {...}

You get an oatmeal rasin cookie for that! And an easter egg in the Descent parser that won't mark that as a syntax error if I'm feeling bored.
November 30, 2007
Matti Niemenmaa wrote:
> Bill Baxter wrote:
>> Now you're on to something!  Just tweak that last one slightly:
>>
>>   (this is !in function) int my_method() {...}
>>
>> Perfect!
> 
> Nah, this one's perfect:
> 
> (this function is !in this class) int my_method() {...}
> 
If only we had Java's instanceof:

(this function is !in this instanceof this class) int my_method() {...}
November 30, 2007
Matti Niemenmaa wrote:
> Bill Baxter wrote:
> 
>>Now you're on to something!  Just tweak that last one slightly:
>>
>>  (this is !in function) int my_method() {...}
>>
>>Perfect!
> 
> 
> Nah, this one's perfect:
> 
> (this function is !in this class) int my_method() {...}
> 

Free kudos* to the first person to get a haiku of key words to compile. Anyone want to go for a limerick?


* kudos will consist of "well done ____" being posted where ____ is replaced with the name of the person awarded said kudos.
« First   ‹ Prev
1 2