[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] criticism of the new syntax
From: |
agonyzhou |
Subject: |
Re: [Help-smalltalk] criticism of the new syntax |
Date: |
Thu, 20 Dec 2007 00:40:58 +0000 |
-------------- Original message ----------------------
From: Paolo Bonzini <address@hidden>
> Derek Zhou wrote:
> > On Tuesday 18 December 2007 12:06:59 am Stephen Compall wrote:
> >> MyClass extend [
> >> "more methods!"
> >> ]
> >>
> >> This is already in there.
> > Cool, how about one small step further, like:
> > MyClass category: 'new category' extend [
> > "more methods!"
> > ]
>
> Yes, even without the "extend" keyword, that's feasible.
So, if I want to break down a large class into multiple files with each file
containing one category, what should I write?
Object subclass: MyClass [
| var1 var2|
]
MyClass class >> category: 'instance creation' [
new [...]
]
MyClass category: 'category1' [
method1 []
]
MyClass category: 'category2' [
method2 []
]
What does the keyword "extend" do?
Derek
- Re: [Help-smalltalk] criticism of the new syntax,
agonyzhou <=