public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [Help-smalltalk] criticism of the new syntax
       [not found] <200712162246.49344.agonyzhou@comcast.net>
@ 2007-12-17  9:28 ` Paolo Bonzini
  2007-12-17 11:26   ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2007-12-17  9:28 UTC (permalink / raw)
  To: GCC Patches, GNU Smalltalk

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Help-smalltalk] criticism of the new syntax
  2007-12-17  9:28 ` [Help-smalltalk] criticism of the new syntax Paolo Bonzini
@ 2007-12-17 11:26   ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2007-12-17 11:26 UTC (permalink / raw)
  To: gcc-patches

This was obviously meant for only one of the two destination lists. 
Sorry. :-)

Paolo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-17  9:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200712162246.49344.agonyzhou@comcast.net>
2007-12-17  9:28 ` [Help-smalltalk] criticism of the new syntax Paolo Bonzini
2007-12-17 11:26   ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).