Pipe syntax and the current methods

Rob Withers reefedjib at yahoo.com
Thu Aug 30 18:41:00 UTC 2007


----- Original Message ----
From: Igor Stasenko <siguctua at gmail.com>
To: The general-purpose Squeak developers list <squeak-dev at lists.squeakfoundation.org>
Sent: Thursday, August 30, 2007 11:15:14 AM
Subject: Re: Pipe syntax and the current methods


> On 30/08/2007, Yoshiki Ohshima <yoshiki at squeakland.org> wrote:
> >   Hello,
> >
> > > Since Pipes makes Smalltalk better at prototyping, Pipes gives me a sharper pencil.
> >
> >   I think I know a part of your frustration.  When you are trying make
> > the idea rendered into the first cut of code, you really don't want to
> > move the cursor back in the characters you typed and insert some other
> > stuff just to make it compile and do something.
> >
> >   Another approach to solve this problem is to make the editor
> > smarter.  I could imagine to have a some command-key sequence that
> > puts open and close parenthesis around the *last* expression.  The
> > definition of the "last" expression may need a clarification but it
> > almost sounds like "right before the last statement separater ($.)"
> > would be good.  With it, if you type:
> >
> >   aCollection select: [:each | each isSomething]
> >
> > and then realize that you actually want to continue to write collect:,
> > then you press a key combination and it enclose the above expression
> > with $( and $).  In this way, you don't have to change the language.
> >
> >   For this kind of stuff, having three different precedence in message
> > sending is basically two too many.  That is why the lisp-mode in Emacs
> > shines more than any other modes.  But for Smalltalk-80 syntax, it
> > wouldn't be too bad.
> >
> 
> And then the only thing you need is to implant a chip into your brain
> to be able read code with many (...) fast :)

You already have one of those chips.  They call that your nose and it is for smelling nasty, nasty code smells.  It doesn't matter if you are using () or |, they both smell when used excessively.  Refactor!  

Do something crazy like defining a StackFilter, where you can push expressions into a stack and apply it to an underlying collection.  It would compute the filtered value whenever the underlying collection changes.  Something like this would be a more OO approach, I would think.  Think like an object and not a function.  :)

cheers,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070830/11a19832/attachment.htm


More information about the Squeak-dev mailing list