help-smalltalk
[Top][All Lists]
Advanced

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

Re: [Help-smalltalk] criticism of the new syntax


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] criticism of the new syntax
Date: Mon, 17 Dec 2007 10:01:10 +0100
User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031)

First of all, thanks for the constructive criticism. Some changes to the syntax will definitely go in post 3.0 after we get user feedback, so your message is definitely valuable.

1, too much indention. I don't think the java-ish whole-class-as-a-block syntax is a very good idea for all but the trival classes. Indention doesn't really help for long blocks.

I agree, but on the other hand editors are much better at finding headings for indented scopes, and indented scopes support features such as folding (which I don't use, but other people do).

Also, most languages (Java, Python, Ruby) are doing whole-class-as-a-block, and the main objective of the new syntax was to make the language reasonable to people familiar with those languages. > 2, Now I need to have a category pragma for all the 3 line long method? With
the old syntax casual smalltalker like me don't need to know about pragmas at all; besides I think pragmas look ugly by themselves.

I think most newcomers won't use the category pragmas at all. I still hope that one day the file-based syntax will be editable with a browser.

Person >> category: 'printing' [
        printOn: aStream [
                ...
        ]
...
]

Yes, that's nice.  Unfortunately, I thought of it as well as of permitting

Person >> new [
    <category: '...'>
]

at toplevel, but they would not be easy to implement in the current parser. However, based on you proposal, something I could do pretty easily is this:

    Object subclass: Person [
        | name age |

        Person class >> category: 'instance creation' [
            new [
                    ...
            ]
            ...
        ]
    ]

What do you think?

Paolo




reply via email to

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