[Top][All Lists]

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

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

From: Mike Anderson
Subject: Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax
Date: Sat, 10 Mar 2007 13:23:13 +0000
User-agent: Thunderbird (X11/20061025)

Sungjin Chun wrote:
> Paolo Bonzini wrote:
>> Speak now if you wish. :-)
>> Paolo
> OK, then....
> What about +/- for class/instance method like Objective-C? I think your
> example is rather complex for defining class/instance method. For other
> parts I actually does not have good/bad points.
> Bye.

This is unrelated to the scripting syntax, but I have experimented with
adding methods #-< , #@ and #@@ on Class for #subclass:,
#addInstVarName: and #addClassVarName: respectively. This allows a
ruby-like syntax:

Object -< #TreeModel
        @ 'document'
        @@ 'NodeTypes'!

In the end, I decided that defining #subclass:, #subclass:instVarNames:
and #subclass:instVarNames:classVarNames: was a better compromise
between my need for less typing and easy-understandability for
'conventional' Smalltalkers. Still, it has its attractions.


reply via email to

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