[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Re: Using Smalltalk as a scripting language

From: Paolo Bonzini
Subject: [Help-smalltalk] Re: Using Smalltalk as a scripting language
Date: Fri, 30 Oct 2009 18:58:42 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4

On 10/30/2009 06:55 PM, Paolo Bonzini wrote:
On 10/30/2009 06:50 PM, Roland Plüss wrote:
So with other words no damage is done if I hijack #new for the creation
purpose and leaving #initialize to the scripts only for code to setup
their smalltalk type parameters.

Yeah, you can even hijack #basicNew (normally a primitive, but a cCall
is also a "primitive") and do the usual

new [ ^super new initialize ]

I had a 50% chance of getting it right, and didn't.  I obviously meant

    new [ ^self basicNew initialize ]


reply via email to

[Prev in Thread] Current Thread [Next in Thread]