Beginner smalltalk question: Open Classes and Smalltalk

Rich rjseagraves at gmail.com
Mon Jan 16 18:23:30 UTC 2006


I guess that's what I'm getting at.  It'd be nice to play around with
internals without having the Smalltalk image remember what I did.  I
suppose it wouldn't be much trouble to confine my "playing around
with" within a specific "junk" project.

-Rich

On 1/16/06, Jason Rogers <jacaetevha at gmail.com> wrote:
> I see one main difference here with Ruby.  When you add methods "at
> runtime", eg. programatically, they stick around in the class
> definition.  In ruby they are there only in the context of the current
> runtime.  Smalltalk saves its runtime state at exit (unless you choose
> to not save the image when you exit).  So, meta-programming has a bit
> of a different flavor in Smalltalk than in Ruby.
>
> On 1/16/06, Ramon Leon <rleon at insario.com> wrote:
> > The short answer, is don't add methods from a workspace, just open the
> > class browser, find the class you want, and add a method to it.  Every
> > class in the system is open for you to edit anytime you like.
> >
> > > -----Original Message-----
> > > From: squeak-dev-bounces at lists.squeakfoundation.org
> > > [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On
> > > Behalf Of Rich
> > > Sent: Sunday, January 15, 2006 7:18 PM
> > > To: squeak-dev at lists.squeakfoundation.org
> > > Subject: Beginner smalltalk question: Open Classes and Smalltalk
> > >
> > > The Ruby language supports the concept of "Open Classs" or
> > > that at run-time a class can have methods added to it, or in
> > > general have it's definition modified.  As I understand it,
> > > the idea for this originally came from Smalltalk.  If so, how
> > > would I go about adding methods (in the workspace, for
> > > example, just to test things out)?  Thanks alot.
> > >
> > > -Rich
> > >
> > >
> >
> >
>
>
> --
> Jason Rogers
>
> "I am crucified with Christ: nevertheless I live; yet not I,
> but Christ liveth in me: and the life which I now live in
> the flesh I live by the faith of the Son of God, who loved
> me, and gave himself for me."
>     Galatians 2:20
>
>



More information about the Squeak-dev mailing list