This is the mail archive of the
mailing list for the GCC project.
Re: [Help-smalltalk] criticism of the new syntax
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, GNU Smalltalk <help-smalltalk at gnu dot org>
- Date: Mon, 17 Dec 2007 10:01:10 +0100
- Subject: Re: [Help-smalltalk] criticism of the new syntax
- References: <firstname.lastname@example.org>
- Reply-to: bonzini at gnu dot org
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
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 [
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' [
What do you think?