<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">If you unsure, how your
double-colon-constructs are parsed,<br>
you can use the pretty printer; it is blissfully unaware of<br>
double-colon-syntax.<br>
<br>
On 3/10/23 7:52 AM, Alexandre Rousseau via Cuis-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKmOayK_ijb=7OUP7KnX+Meh=Ef+OzLaVDWDEySHuTxR6yH8cQ@mail.gmail.com">
<pre class="moz-quote-pre" wrap=""> Thanks for the link.
* Cascades
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">There are two kinds of message cascades.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Semicolons can be used to send a cascade of messages to the original
receiver. In "Transcript show: 'hello'; cr" we first send the keyword
message #show: 'hello' to the receiver Transcript, and then we send
the unary message #cr to the same receiver.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">It is sometimes useful to send messages to the result of a message
send. In "BoxedMorph new :: color: Color blue; openInWorld.", we send
succeeding messages to the new BoxedMorph instance, not the BoxedMorph
class.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
So,
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">lay1 beRow :: borderWidth: 1 :: borderColor: (Color black) .
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
can also be expressed as
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">lay1 beRow; borderWidth: 1; borderColor: (Color black).
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
since all messages are intended for the original receiver (lay1).
And since "beRow" also returns the original object (lay1),
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">lay1 beRow :: borderWidth: 1 :: borderColor: (Color black) .
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
works as well.
A.
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">According to this page:
<a class="moz-txt-link-freetext" href="https://cuis-smalltalk.github.io/TheCuisBook/Summary-of-Syntax.html">https://cuis-smalltalk.github.io/TheCuisBook/Summary-of-Syntax.html</a>
Double-colon sends the message to the result of the previous expression. I
would guess that would make it functionally equivalent to putting the
previous expression in parens.
So:
lay1 beRow :: borderWidth: 1 :: borderColor: (Color black) .
would be the same as:
((lay1 beRow) borderWidth: 1) borderColor: (Color black) .
Unless I'm missing something...</pre>
</blockquote>
</blockquote>
Nope, that's the gist of it.<br>
It makes Cuis less lisp-like than other Smalltalks.<br>
<blockquote type="cite"
cite="mid:CAKmOayK_ijb=7OUP7KnX+Meh=Ef+OzLaVDWDEySHuTxR6yH8cQ@mail.gmail.com">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
- Jon
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
</blockquote>
<br>
HTH,<br>
<br>
Gerald<br>
</body>
</html>