The most recent syntax

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The most recent syntax

ZuLuuuuuu
Hello,

If I'm not wrong there are more than one way to do some things in Smalltalk when
3.0 is released. What is the most recent syntax in GNU Smalltalk for

 - Creating classes (with some instance variables, class variables, comment etc...)
 - Extending classes
 - Creating objects

? I guess it is not the syntax on online documentation?



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Canol Gökel
Reply | Threaded
Open this post in threaded view
|

Re: The most recent syntax

Paolo Bonzini-2
Canol Gokel wrote:
> Hello,
>
> If I'm not wrong there are more than one way to do some things in Smalltalk when
> 3.0 is released. What is the most recent syntax in GNU Smalltalk for
>
>  - Creating classes (with some instance variables, class variables, comment etc...)

Superclass subclass: Subclass [
     | instVar1 instVar2 |
     ClassVar1 := Dictionary new.
     ClassVar2 := nil.

     <comment: 'here it is'>
]

>  - Extending classes

Same as above, with "ClassName extend" or "ClassName class extend"
before the bracket.

>  - Creating objects

This has not changed, it's standard Smalltalk.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: The most recent syntax

ZuLuuuuuu
Paolo Bonzini <bonzini <at> gnu.org> writes:

>
>
> Superclass subclass: Subclass [
>      | instVar1 instVar2 |
>      ClassVar1 := Dictionary new.
>      ClassVar2 := nil.
>
> This has not changed, it's standard Smalltalk.
>
> Paolo
>


Thanks, now I am stuck at creating methods for them. Actually, if there are
sample programs written in new syntax they would help me a lot, all the samples
in source package are written in old style :(



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Canol Gökel
Reply | Threaded
Open this post in threaded view
|

Re: Re: The most recent syntax

Paolo Bonzini-2

> Thanks, now I am stuck at creating methods for them. Actually, if there are
> sample programs written in new syntax they would help me a lot, all the samples
> in source package are written in old style :(

Not really, everything in kernel/* and scripts/* and big parts of
packages/* is written in the new syntax; so is the tutorial, maybe you
should just read that.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: The most recent syntax

ZuLuuuuuu
Paolo Bonzini <bonzini <at> gnu.org> writes:

>
> Not really, everything in kernel/* and scripts/* and big parts of
> packages/* is written in the new syntax; so is the tutorial, maybe you
> should just read that.
>
> Paolo
>


Ah ok, I didn't know about that tutorial in source package, I will read it.



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Canol Gökel