Fear and loathing of the "perification" of Smalltalk

Peter William Lount peter at smalltalk.org
Tue Sep 4 18:08:50 UTC 2007


Hi,

Jon Hylands wrote:

 > I like things that are simple. One of the reasons I like Smalltalk
 > so much is because it is simple. The BNF chart for the language
 > is incredibly small. Any changes made to it should be carefully
 > considered from a cost-benefit analysis.

I agree with Jon that changes to the Smalltalk syntax need to be very 
carefully considered. The perlification of Smalltalk has already begun 
unnecessarily with the curly braces!

By perlification I mean the adding of syntax gone wild, especially when 
it isn't needed or when it destroys the beauty of simplicity.

The piping capability looks interesting but lets seriously consider it's 
impact upon the syntax and portability issues.


The Perlification of Smalltalk: Curly Braces and the Road to 
PerlCrypticTalk.
Let's take the example of the addition of the curly braces to Squeak 
Smalltalk. They provide a nice way to instantiate a collection of 
objects very compactly. However, they unnecessarily added new syntax to 
Squeak Smalltalk in my view. How?

The square brackets can do the same job with greater flexibility and 
capabilities to boot! Blocks would simply have needed a small set of new 
messages in their class and the virtual machine would just have needed 
an enhancement for collecting as it evaluates. This wouldn't have added 
any new syntax to Smalltalk thus avoiding a step towards Perl. Here are 
some examples:

    "Same as using curly braces but importantly NO syntax changes needed!"
    list := [a. b. c] objects.

    "More flexible version that lets you collect the evaluated results
    into an arbitary collection of your own choosing."
    [a. b. c] addObjectsTo: aCollection.

    "Wow, even into a stream."
    [
        1 to: 1000 do: [:count | count random ]
    ] streamObjectsInto: aStreamOfRandomIntegers

Ok, the message names for the evaluation-results-collection protocol 
might need some work but the principle is sound and much better than the 
curly braces since it adds extra capability.


The Perification of Smalltalk: Piping Smalltalk into PerlCrypticTalk.
I fear that more time is needed to come up with a better piping 
construct than the ones suggested although they may make sense. Maybe we 
could inventory the suggestions made to date?

I fear the "perification" of Smalltalk syntax. Please keep it clean.

It might be wise towards ensuring portability of syntax changes that a 
process be set up with all of those who create Smalltalk versions to 
participate in some manner. Just wily nilly adding new syntax to just 
one version of Smalltalk in an ad hoc manner without considering it's 
wider impact can create a lot of confusion for people who use the 
language. Isn't it confusing enough that we have 20+ versions of 
Smalltalk out there? Now we have a version that is heading to become a 
syntax mess like Perl.

I suggest a Smalltalk 2010 standard. Maybe that's too soon, but why not?

My two cents.

All the best,

Peter
peter at smalltalk.org




More information about the Squeak-dev mailing list