[Newcompiler] About keywords

Stéphane Ducasse stephane.ducasse at univ-savoie.fr
Sun May 13 14:53:17 UTC 2007


Ok I was thinking that it would be good to fix these two methods have  
good tests to cover
what they do exactly. because keywords is really under specified.

I have the impression that we need to have

#put:foo: selectorKeywords -> #(put: foo:)
#+ selectorKeywords -> #(+)
#class selectorKeywords -> #(class)
#'put: anObject foo: asecond'  selectorKeywords -> error!

'anObject put: anotherObject foo: aThirdOne' keywordsAndArgs ->
	#((put: -> anotherObject) (foo: aThirdOne))

'put: anotherObject foo: aThirdOne' keywordsAndArgs ->
	#((put: -> anotherObject) (foo: aThirdOne))

'put: anotherObject foo: aThirdOne' keywordsAndArgs ->
	#((put: -> anotherObject) (foo: aThirdOne))

'class' keywordsAndArgs ->
	#((class -> nil))

Not sure but this would be the idea.

Stef
	

> On 12.05.2007, at 22:13, Stéphane Ducasse wrote:
>
>> Hi guys
>>
>> I was playing with Nile and I got some problems with keywords.
>> I looked at this method and I do not understand what it is exactly  
>> doing.
>> It seems to me that this is not well defined.
>> I wrote some tests. And after doing that I was even more confused.  
>> I have the impression that the compiler
>> and methodNode in particular should not rely on a so badly defined  
>> method.
>> What is your impression.
>>
>
> The same impression that I get when reading String>>numArgs.   
> "Geniuses at work (TM)" ;-)
>
> It seems that it has been hacked to death for some abandoned  
> alternate syntax experiment...
>
>
> 	Marcus



More information about the Newcompiler mailing list