[squeak-dev] smalltalk evolution

Juan Vuletich juan at jvuletich.org
Wed Jun 1 01:24:05 UTC 2011


info at tomsik.cz wrote:
> On Tue, 31 May 2011 22:01:14 +0200, Randal L. Schwartz 
> <merlyn at stonehenge.com> wrote:
>
>>>>>>> "info at tomsik" == info at tomsik cz <info at tomsik.cz> writes:
>>
>> info> In short: 1.) binary messages make sense only for math. I've never
>> info> implemented even one binary message, have you? (for non-math
>> info> things)
>>
>> info> Why not step further and make dsl for equations? let them live
>> info> outside of language.  (with everything common to math world)
>>
>> info> 2.) keyword messages with more than 2 arguments are just ugly -
>> info> they smell in the "missing another object" way. And 2 arguments
>> info> are rare too. I would allow one argument at top.
>>
>> So, you've now eliminated both possible ways of creating a new Point:
>>
>>     3 @ 4
>>     Point x: 3 y: 4
>>
>
> I'll go few steps further to show big-picture in hypothetical syntax
> (one-argument closures with argument as implicit receiver, no returns 
> -> CPS)
>
> Point new: [x: 3, y: 4, printOn: aStream].
> <rcvr> <msg>: <arg>[<msgForNew>: <arg>, <msgForNew>: <arg>, 
> <msgForNew>: <arg>].
> concepts: always left-to-right (receiver->message->argument), no 
> parentheses -> uniformity
> returns: nothing, does something

So, #new: creates a point without values for x and y... What if I want 
to only build objects that make sense, meaning that their instance 
variables must conform to some invariant defined by the class?

> vs.
> (Point x: 3 y: 4) printOn: aStream.
> (<rcvr> <msg>: <arg> <key2>: <arg2>) <msg>: <arg>.
> concepts: sometimes left-to-right, depending on parentheses and 
> message-type (syntax)
> returns: aPoint, which won't be used anyway, because it was printed 
> already.

Easy choice. This is much nicer.

Cheers,
Juan Vuletich

>> I wonder what language we would end up with if all of your (even
>> conflicting) goals were implemented.
>>
>> The more syntax you eliminate, the more you end up with LISP.  Maybe you
>> want LISP... you know where to find it!
>>
>
> I'm not saying "let's drop objects", I'm saying "let's simplify 
> language, let's drop unused/misused/bad-in-long-process things"
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1375 / Virus Database: 1509/3663 - Release Date: 05/27/11
>
>




More information about the Squeak-dev mailing list