View mode: basic / threaded / horizontal-split · Log in · Help
November 30, 2007
Idea for getting rid of "static" on methods
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
Re: Idea for getting rid of "static" on methods
"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
Re: Idea for getting rid of "static" on methods
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
Re: Idea for getting rid of "static" on methods
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
Re: Idea for getting rid of "static" on methods
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
Re: Idea for getting rid of "static" on methods
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
Re: Idea for getting rid of "static" on methods
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
Re: Idea for getting rid of "static" on methods
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
Re: Idea for getting rid of "static" on methods
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
Re: Idea for getting rid of "static" on methods
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
Top | Discussion index | About this forum | D home