This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]