Editing class method sources in single place - use GST syntax

Andreas Raab andreas.raab at gmx.de
Wed Jan 30 22:00:08 UTC 2008


Francisco Garau wrote:
>> I just got an idea, what if make option for browser to show all
>> methods in one big listing, so developer can see, edit and do search
>> e.t.c using single code window without switching to different methods.
>> The idea, in general is to make browser look more convenient for
>> newcomers because most of mainstream languages keeping per-class
>> sources in single big source file.
> 
> If you want to do that, I think GNU Smalltalk syntax is more "newcomer 
> friendly". Here is a simple example in case you haven't seen it.
> 
> Magnitude subclass: Date [
>  | days day month year |
> 
>  Date class >> today [
>    <category: 'instance creation (Blue Book)'>
>    ^self fromSeconds: Time secondClock
>  ]
> 
>  subtractDays: dayCount [
>    <category: 'basic'>
>    ^Date fromDays: self days - dayCount
>  ]
> ]
> 
> Thanks Paolo! you've got rid of the exclamation marks in a beatiful way.

Heh. This looks just like my SqueakScript hacks from 2001 ;-)

Cheers,
   - Andreas



More information about the Squeak-dev mailing list