View mode: basic / threaded / horizontal-split · Log in · Help
December 01, 2007
Re: Idea for getting rid of "static" on methods
BCS wrote:
> 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.

Problem is, most keywords don't work too close to each other. If you 
allow arbitrary identifiers, too easy.
December 01, 2007
Re: Idea for getting rid of "static" on methods
Matti Niemenmaa, el 30 de noviembre a las 21:11 me escribiste:
> 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() {...}

The obvious missing one is:

> (class function with out this) int my_method() {...}

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
Oiganmen ñatos de corazón, es más posible que un potus florezca en
primavera a que un ángel pase con una remera.
	-- Peperino Pómoro
December 01, 2007
Re: Idea for getting rid of "static" on methods
BCS wrote:
> Free kudos* to the first person to get a haiku of key words to compile.

protected static
this() { if (new short) assert (is(
typeof(typeid(int)))); }

> Anyone want to go for a limerick?

static assert (is(typeof(new short)));
static this() { if (new short is new short)
	volatile if (true)
	try { debug null; do {}
while (false); } catch { return new ushort;}}

Both compile with 1.024. With 2.0 one could probably use the const stuff to good
effect.

-- 
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
December 02, 2007
Re: Idea for getting rid of "static" on methods
Reply to Matti,

> BCS wrote:
> 
>> Free kudos* to the first person to get a haiku of key words to
>> compile.
>> 
> protected static
> this() { if (new short) assert (is(
> typeof(typeid(int)))); }
>> Anyone want to go for a limerick?
>> 
> static assert (is(typeof(new short)));
> static this() { if (new short is new short)
> volatile if (true)
> try { debug null; do {}
> while (false); } catch { return new ushort;}}
> Both compile with 1.024. With 2.0 one could probably use the const
> stuff to good effect.
> 

well done Matti!!!

That is cool.
December 03, 2007
Re: Idea for getting rid of "static" on methods
Matti Niemenmaa schrieb:
> BCS wrote:
>> Free kudos* to the first person to get a haiku of key words to compile.
> 
> protected static
> this() { if (new short) assert (is(
> typeof(typeid(int)))); }
> 
>> Anyone want to go for a limerick?
> 
> static assert (is(typeof(new short)));
> static this() { if (new short is new short)
> 	volatile if (true)
> 	try { debug null; do {}
> while (false); } catch { return new ushort;}}
> 
> Both compile with 1.024. With 2.0 one could probably use the const stuff to good
> effect.
> 

OMG.

Well done Matti.
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home