[Top][All Lists]

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

Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax

From: Paolo Bonzini
Subject: Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax
Date: Tue, 13 Mar 2007 07:08:14 +0100
User-agent: Thunderbird (Macintosh/20070221)

>     Object subclass: #MyClass.
>     MyClass comment: 'A simple example class'.

Except that MyClass is not available yet...

One would need something like

        Object subclass: #MyClass!
        MyClass comment: 'A simple example class'!


    Eval [
        Object subclass: #MyClass.
    Eval [
        MyClass comment: 'A simple example class'.

>   * Class and instance variables are defined the same way, except that
> class variables are defined within class method definition scope and
> instance variables -- within instance method definition scope.

Unfortunately, the | | syntax for instance variables will define
*class-instance* variables when used in class method definition scope.

This was probably something you and Mike both missed.

> One of the things that I consider important is the distinction or rather
> lack of distinction between class methods and instance methods;  that
> classes objects to the same amount their own instances are.  It was
> something I was unaware of and Smalltalk made it instantly clear without
> lumping them together.  I think it should be kept that way.


> Something that I didn't notice in the examples was pool dictionaries.  I
> can't say I've seen any examples of how they're actually used in
> practice but since they have to be declared in the usual class
> definition, they're probably used for something.  Will there be syntax
> to handle them?

Yes, it should be something like

    <import: PoolDictionary>


reply via email to

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