[BUG?] ScriptingSystem arithmetics

Alan Kay squeak-dev at lists.squeakfoundation.org
Tue Oct 15 13:55:52 UTC 2002


Let's make it and try it.

Cheers,

Alan

------

At 1:55 PM +0300 10/15/02, richard at simula.no wrote:
>Have you (all) already tried parentheses?  You don't need to show the
>parentheses if the parsing order is understood, but during dragging (of
>a new operator) the implicit paretheses could be made explicit so that
>the operator could be dropped in the intended place.
>
>Bert's example can then be built as he first attempted:
>value
>(value) max: ()
>(value) max: (-20)
>((value) max: (-20)) min: ()
>((value) max: (-20)) min: (20)
>The difference for Bert is that here the parentheses are made explicit
>so he has the choice to drop #min inside or outside the parentheses with
>-20.  Dropping inside makes -20 part of the #min: expression.  Dropping
>outside makes the entire #max: expression a subexpression to the #min:
>expression.
>
>Equivalently, you can avoid parentheses by using a visual representation
>of a tree.  Even children must learn how to climb a tree.
>
>Rich
>
>To: squeak-dev at lists.squeakfoundation.org
>>  From: Alan Kay <Alan.Kay at squeakland.org>
>>  Subject: Re: [BUG?] ScriptingSystem arithmetics
>>  Reply-To: squeak-dev at lists.squeakfoundation.org
>>
>>  Bert --
>>
>>  It's an "unfinished feature" in search of an idea. It's unfinished
>>  because we didn't come up with a really nice and simple way to deal
>>  with subexpressions in etoys. The idea was to solve this problem at
>>  the next scripting level -- for Omniusers -- but this didn't get
>>  finished either, so no solution was moved to etoys. I expect that all
>>  of this will be much better and nicer in a few months. However, we
>>  still don't have a great "kids way" to think about and make
>>  subexpressions. Got any good ideas?
>>
>>  Cheers,
>>
>>  Alan
>>
>>  -----
>>
>>  At 12:14 PM +0200 10/14/02, Bert Freudenberg wrote:
>>  >I think this is a bug, or confusing at least:
>>  >
>>  >When constructing arithmetic expressions with tiles, they bind from right
>>  >to left. However, the graphic representation suggests a left-to-right
>>  >order, which also would be the "smalltalky" way of binding. It only gets
>>  >obvious when one looks at the textual representation.
>>  >
>>  >My particular case was limiting the range of a variable using min: and
>>  >max:. Of course, I constructed it as "[value][max:][-20][min:][20]".
>>  >But the actual code generated is "value max: (-20 min: 20)".
>>  >
>>  >A workaround is to use "[-20][max:][20][min:][value]" which results in
>>  >"-20 max: (20 min: value)" but this is surprising, at best.
>>  >
>>  >I don't see a simple solution. Any ideas?
>>  >
>>  >-- Bert
>>


-- 



More information about the Squeak-dev mailing list