help-smalltalk
[Top][All Lists]
Advanced

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

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


From: Roland Plüss
Subject: Re: [Help-smalltalk] Using Smalltalk as a scripting language
Date: Fri, 30 Oct 2009 18:50:38 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090926)

>>> Most likely you'd have a cCall for #initialize
>>> anyway.  Having one for #new instead does not change much.
>>>
>> To my understanding ( from past smalltalk lectures at university where
>> we worked with Squeak ) #new is responsible for allocating an object
>> while #initialize or #init is responsible for setting up default values
>> for the newly created instance. Therefore I proposed #new. Unless that
>> is in GST this rule is slightly different.
>
> Yes, my reasoning is: if you used CObject, you would have needed
> anyway a cCall to initialize the CObject.  By not using CObject, you
> just need your cCall to determine the correct size of the object so
> you use #new.  But it's not like one of the two is particularly more
> hackish.
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. That sounds good. Let's see if I can
get this one up and kicking. I can't remember of any game project using
smalltalk for scripting. A pity, it's after all the mother of all OO
languages :P ( and a cool language on top of it ).

-- 
Yours sincerely
Plüss Roland

Leader and Head Programmer
- Game: Epsylon ( http://epsylon.rptd.ch/ ,
http://www.moddb.com/games/4057/epsylon )
- Game Engine: Drag(en)gine ( http://dragengine.rptd.ch ,
http://www.moddb.com/engines/9/dragengine )
- Normal Map Generator: DENormGen ( http://epsylon.rptd.ch/denormgen.php )

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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