[Cuis-dev] official operator names of ; and ::

Boris Shingarov shingarov at labware.com
Thu Aug 15 11:56:57 PDT 2024


FWIW, I would also mention that Chaining is not part of the standard
Smalltalk-80 syntax, but a (rather nice in practice, I find) extension
in Cuis.  Having said that, I also admit that going by measuring in
millivallouds, I find this "nice-at-the-cost-of-increased-complexity"
somewhat disturbing: new/improved functionality is best implemented
by *removing* code and complexity, not by *adding*.

Also, we've got to stop with our self-complacent attitude of ignoring
competition.  We've got extremely successful competitor languages with
really simple syntax, next to which our Smalltalk-80 syntax looks "too
big: barely fits on a postcard" even without the modern extensions.
I salivate over Haskell's chaining ("$") being just-another-function
while I can't express #:: (and #; and #^ for that matter) as just-
another-message.

Or can I?
Let's look at, say, #^ (just because I find it the most annoying of
the bunch, next to how Haskell reifies "notion of computation").
First, we would need prefix selectors, like Leandro-style #¬ and #-
when he wants to write

  ¬ (a<b and: [c>d])

or

  - (a+1).

(So prefix #^ is like unary #return).

Second, we need to reify returning.  The (very very old) idea comes from
LaLonde and van Gulik [1], they implement Prolog-like backtracking with
zero change to VM (nor to bytecode nor to base class-library nor to
compiler), by messing with the sender's Context (changing bytecodeCounter
and other things WHILE IT'S STILL OUR OWN SENDER, then making it the
current context).  Ok maybe for return some extra selectors will need
to become special, but we already have special selectors like #ifTrue:,
so nothing new here.  In this way Object>>return will capture the
default notion of return; imagine what subclasses could do by redefining
it?

[1] https://doi.org/10.1145/62083.62094


On Mon, Aug 12, 2024 at 10:54:49AM -0300, Juan Vuletich via Cuis-dev wrote:
> Hi Folks,
> 
> The Appendix B of the CuisBook needs a better, separate explanation of
> Cascade (;) and Chain (::). Vanessa's example is too good not to include it.
> 
> Any takers?
> 
> Thanks,
> 
> On 8/1/2024 4:24 PM, Vanessa Freudenberg via Cuis-dev wrote:
> > That's not a great example for :: because it works just as well without
> > it. This may be a better illustration:
> > 
> > 3 + 4 squared => 7
> > 3 + 4 ; squared => 9
> > 3 + 4 :: squared => 49
> > 
> > Nessa
> > 
> > On Thu, Aug 1, 2024 at 7:11 AM Mark Volkmann via Cuis-dev
> > <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
> > 
> >     Thanks Andres! Interestingly page 178 in the Cuis Book (Appendix
> >     B) says this:
> > 
> >     Transcript show: 'hello'; cr                        message
> >     cascade (;)
> > 
> >     BoxedMorph new :: color: Color blue; openInWorld    message
> >     cascade (::)
> > 
> > 
> >     But surely these can't go by the same name, so I think you are
> >     correct.
> > 
> > 
> >     On Wed, Jul 31, 2024 at 9:37 PM Andres Valloud via Cuis-dev
> >     <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
> > 
> >         The name of this bit of syntax is "chain".
> > 
> >         On 7/31/24 6:17 PM, Mark Volkmann via Cuis-dev wrote:
> >         > What is the official name of the :: operator?
> >         --         Cuis-dev mailing list
> >         Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
> >         https://lists.cuis.st/mailman/listinfo/cuis-dev
> > 
> > 
> > 
> >     --     R. Mark Volkmann
> >     Object Computing, Inc.
> >     --     Cuis-dev mailing list
> >     Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
> >     https://lists.cuis.st/mailman/listinfo/cuis-dev
> > 
> 
> 
> -- 
> Juan Vuletich
> cuis.st
> http://github.com/jvuletich
> http://researchgate.net/profile/Juan-Vuletich
> http://independent.academia.edu/JuanVuletich
> http://patents.justia.com/inventor/juan-manuel-vuletich
> http://linkedin.com/in/juan-vuletich-75611b3
> http://twitter.com/JuanVuletich
> 

> -- 
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev



More information about the Cuis-dev mailing list