[Vm-dev] Push/pop considered harmful

John M McIntosh johnmci at smalltalkconsulting.com
Tue Mar 3 19:05:45 UTC 2009

well we also have

	self primitive: 'primitiveCreateHostWindow'
		parameters: #(SmallInteger SmallInteger SmallInteger SmallInteger  

So I'm wondering here how many ways do we want to achieve the same  
Most people wanting to build a plugin want something that doesn't  
require too much thinking,
then again very few people build plugins, but in the code about, well  
we know it should have 5 parms
However the construct doesn't handle the case of  
expectedNumArgsBetween: 0 and: 3

On 3-Mar-09, at 10:59 AM, Eliot Miranda wrote:

> self expectedNumArgs: 0
>     => self only
> self expectedNumArgs: 1
>     => self plus one argument
> self expectedNumArgsBetween: m and: n
>     for var-args primitives like perform:[with:*] and value[: 
> [value:*]]
> Perhaps checkNumArgs: or failUnlessNumArgs: are better names?

John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com

More information about the Vm-dev mailing list