<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p>Hi all,</p>
<p><br>
</p>
<p>thanks for your reactions!</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
> <span style="font-size: 12pt;">Well, those symbols actually don't exist at all. It's just a nice thing </span><span style="font-size: 12pt;">about the syntax that blocks look like as if they had those </span><span style="font-size: 12pt;">"empty selectors".</span>
<div><br>
</div>
Wow, that's an interesting comparison :-)</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
Re: code review: I wrote "something like this" to indicate pseudo smalltalk :)</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
Yes, you're right, this should be #next: instead of #take:.</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
> <span>What's wrong with temporaries?</span></div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
Their scope is possibly too large. Usually, this smell suggests you to introduce new methods (in this example: #checkKeywordsSelector:words:, for example). But in this context, it wouldn't match the overall abstraction level. I'm rather a fan of the arbitrary
 method length in Metacello, by the way ... Plus, "readStream in:" introduces a nice analogy to #streamContents: IMHO. However, it was a pseudo script only ;-)</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
#messagePart:repeat: is a bit messy anyway. It changes the semantics of selector.</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
> <span>My image doesn't have #indexOf:ifPresent:.</span></div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<span></span>Neither does mine :-) I should propose them in another commit. #indexOf:[ifPresent:][ifAbsent:] ...</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
So let me know which approach you recommend!</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
Best,</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
Christoph<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Levente Uzonyi <leves@caesar.elte.hu><br>
<b>Gesendet:</b> Mittwoch, 4. März 2020 15:38 Uhr<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] [BUG] Parser does not detect syntax error with double colon</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi Nicolas,<br>
<br>
On Wed, 4 Mar 2020, Nicolas Cellier wrote:<br>
<br>
> Hi all,<br>
> on the other hand, there are remnants of very old "alternate syntax" experiments<br>
> I have some "normalization" of syntax pending in order to reduce unjustified distance to cousin dialects.<br>
> <a href="http://source.squeak.org/inbox/Compiler-nice.267.diff">http://source.squeak.org/inbox/Compiler-nice.267.diff</a><br>
> <br>
> Le mer. 4 mars 2020 à 14:04, Levente Uzonyi <leves@caesar.elte.hu> a écrit :<br>
>       Hi All,<br>
><br>
>       Answers inline. Rant alert!<br>
><br>
>       On Wed, 4 Mar 2020, Thiede, Christoph wrote:<br>
><br>
>       ><br>
>       > Hi all,<br>
>       ><br>
>       ><br>
>       > I took a look into the parser/scanner, let me ask you a few questions:<br>
>       ><br>
>       ><br>
>       > Is it an important requirement that the compiler must be able to understand symbols such as #value::? Should these by valid symbols at all?<br>
><br>
>       What are the consequences if you consider them not valid? What will break?<br>
>       Why shouldn't they be valid? The most common "method names" are<br>
>       #: #:: #::: #::::, etc (as in [ :x | ... ], [ :x :y | ... ], etc)<br>
> <br>
> The question is as well why/when did we ever needed to introduce those selectors, because we do not lookup for blocks thru a selector...<br>
> Adding something is easy, removing is super hard (thus the changes aimed at removal tend to rot in inbox).<br>
<br>
Well, those symbols actually don't exist at all. It's just a nice thing <br>
about the syntax that blocks look like as if they had those<br>
"empty selectors".<br>
<br>
<br>
Levente<br>
<br>
<br>
><br>
>       ><br>
>       > If not, we could change the following line in Scanner >> #xLetter:<br>
>       ><br>
>       >       tokenType := (type == #xColon and: [aheadChar ~~ $=] and: [aheadChar ~= $:])<br>
>       ><br>
>       > Otherwise, we could insert a validation of selector in #messagePart:repeat:. Something like:<br>
>       ><br>
>       ><br>
>       >       selector readStream in: [:stream |<br>
><br>
>       What's wrong with temporaries?<br>
>       I see #in: spreading like plague in methods. IMHO #in: is fine in scripts,<br>
>       but I see no reason to use it as a replacement of temporaries in methods.<br>
> <br>
> +1<br>
><br>
>       >   words do: [:word |<br>
>       >   (stream take: word size - 1)<br>
><br>
>       I had to look up what Stream >> #take: does. It's ^self any:<br>
>       maxNumberOfElements. So, I had do look up what Stream >> #any: does.<br>
>       Surprise, it's ^self next: numberOfElements.<br>
>       Perhaps I'm getting too old, but I see no reason to use these methods<br>
>       when you know the receiver is a stream.<br>
><br>
>       Unfortunately neither methods have comments (#any: #take:), so one could<br>
>       easily come to the conclusion that they are not very useful despite having<br>
>       such generic names.<br>
><br>
>       >   indexOf: $:<br>
>       >   ifPresent: [:index | self notify: 'Argument expected' at: word start + index].<br>
><br>
>       My image doesn't have #indexOf:ifPresent:.<br>
> <br>
><br>
>       Levente<br>
><br>
>       >   stream skip: 1]].<br>
>       ><br>
>       ><br>
>       > Looking forward to your thoughts!<br>
>       ><br>
>       ><br>
>       > Best,<br>
>       ><br>
>       > Christoph<br>
>       ><br>
>       ><br>
>       >________________________________________________________________________________________________________________________________________________________________________________________________________________________________<br>
>       _<br>
>       > Von: Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
>       > Gesendet: Freitag, 28. Februar 2020 14:17:20<br>
>       > An: John Pfersich via Squeak-dev<br>
>       > Betreff: Re: [squeak-dev] [BUG] Parser does not detect syntax error with double colon  <br>
>       > Hi Christoph.<br>
>       > Thanks for pointing this out. This issue has been around for like forever. :-) In Squeak 3.8, however, the list of choices was bigger:<br>
>       ><br>
>       > [IMAGE]<br>
>       ><br>
>       > Let's improve this in 6.0alpha :-)<br>
>       ><br>
>       > Best,<br>
>       > Marcel<br>
>       ><br>
>       >       Am 28.02.2020 13:49:03 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:<br>
>       ><br>
>       >       Steps to reproduce:<br>
>       ><br>
>       >       Try doIt this (for example, in a workspace):<br>
>       ><br>
>       >       2 raisedTo:: 3.<br>
>       ><br>
>       ><br>
>       >       Expected behavior:<br>
>       ><br>
>       >       2 raisedTo:"Argument expected ->": 3.<br>
>       ><br>
>       ><br>
>       >       Actual behavior:<br>
>       ><br>
>       >       [IMAGE]<br>
>       ><br>
>       >       If you are thumb enough to choose #raisedTo:: (I was), you get a subsequent error:<br>
>       ><br>
>       >       [IMAGE]<br>
>       ><br>
>       >       Even worse: If you try to doIt the same code snippet again, no parser warning/error will be raised at all but you get a runtime error:<br>
>       ><br>
>       >       MessageNotUnderstood: SmallInteger>>raisedTo::.<br>
>       ><br>
>       ><br>
>       >       Best,<br>
>       ><br>
>       >       Christoph<br>
>       ><br>
>       ><br>
>       ><br>
> <br>
> <br>
></div>
<div class="PlainText"><br>
</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">
<div><br>
</div>
<div>
<hr tabindex="-1" style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px; display: inline-block; width: 1024.63px;">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"></span>
<div id="divRplyFwdMsg" dir="ltr" style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
<font face="Calibri, sans-serif" color="#000000" style="font-size: 11pt;"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Mittwoch, 4. März 2020 16:35 Uhr<br>
<b>An:</b> Robert via Squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] [BUG] Parser does not detect syntax error with double colon</font>
<div> </div>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
<div id="__MailbirdStyleContent" style="font-size: 10pt; font-family: Arial;">Hi, there.
<div><br>
</div>
<div>> <span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Perhaps I'm getting too old, but I see no reason to use these methods</span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;"> </span></div>
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;">when you know the receiver is a stream.</span>
<div><span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;">That's right. :-) Both #any: and #take: are generic forms of #anyOne and #first: and similar for collections that are not necessarily sequenceable. The partial adaptation of the
 collection protocol for streams is still experimental. It is useful in scripting scenarios.</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;">"stream take: 42" does not make any sense.</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;">"streamOrCollection take: 42" can be quite useful. :-)</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;"><br>
</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Best,</span></div>
<div><span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Marcel</span></div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style: solid; border-width: 1px; margin-top: 20px; margin-left: 0px; padding-left: 10px; min-width: 500px;">
<p style="margin-top: 10px; color: rgb(170, 170, 170);">Am 04.03.2020 14:04:27 schrieb Levente Uzonyi <leves@caesar.elte.hu>:</p>
<div style="font-family: Arial, Helvetica, sans-serif;">Hi All, <br>
<br>
Answers inline. Rant alert! <br>
<br>
On Wed, 4 Mar 2020, Thiede, Christoph wrote: <br>
<br>
> <br>
> Hi all, <br>
> <br>
> <br>
> I took a look into the parser/scanner, let me ask you a few questions: <br>
> <br>
> <br>
> Is it an important requirement that the compiler must be able to understand symbols such as #value::? Should these by valid symbols at all? <br>
<br>
What are the consequences if you consider them not valid? What will break? <br>
Why shouldn't they be valid? The most common "method names" are <br>
#: #:: #::: #::::, etc (as in [ :x | ... ], [ :x :y | ... ], etc) <br>
<br>
> <br>
> If not, we could change the following line in Scanner >> #xLetter: <br>
> <br>
> tokenType := (type == #xColon and: [aheadChar ~~ $=] and: [aheadChar ~= $:]) <br>
> <br>
> Otherwise, we could insert a validation of selector in #messagePart:repeat:. Something like: <br>
> <br>
> <br>
> selector readStream in: [:stream | <br>
<br>
What's wrong with temporaries? <br>
I see #in: spreading like plague in methods. IMHO #in: is fine in scripts, <br>
but I see no reason to use it as a replacement of temporaries in methods. <br>
<br>
>   words do: [:word | <br>
>   (stream take: word size - 1) <br>
<br>
I had to look up what Stream >> #take: does. It's ^self any: <br>
maxNumberOfElements. So, I had do look up what Stream >> #any: does. <br>
Surprise, it's ^self next: numberOfElements. <br>
Perhaps I'm getting too old, but I see no reason to use these methods <br>
when you know the receiver is a stream. <br>
<br>
Unfortunately neither methods have comments (#any: #take:), so one could <br>
easily come to the conclusion that they are not very useful despite having <br>
such generic names. <br>
<br>
>   indexOf: $: <br>
>   ifPresent: [:index | self notify: 'Argument expected' at: word start + index]. <br>
<br>
My image doesn't have #indexOf:ifPresent:. <br>
<br>
<br>
Levente <br>
<br>
>   stream skip: 1]]. <br>
> <br>
> <br>
> Looking forward to your thoughts! <br>
> <br>
> <br>
> Best, <br>
> <br>
> Christoph <br>
> <br>
> <br>
> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ <br>
> Von: Squeak-dev im Auftrag von Taeumel, Marcel <br>
> Gesendet: Freitag, 28. Februar 2020 14:17:20 <br>
> An: John Pfersich via Squeak-dev <br>
> Betreff: Re: [squeak-dev] [BUG] Parser does not detect syntax error with double colon   <br>
> Hi Christoph. <br>
> Thanks for pointing this out. This issue has been around for like forever. :-) In Squeak 3.8, however, the list of choices was bigger: <br>
> <br>
> [IMAGE] <br>
> <br>
> Let's improve this in 6.0alpha :-) <br>
> <br>
> Best, <br>
> Marcel <br>
> <br>
> Am 28.02.2020 13:49:03 schrieb Thiede, Christoph : <br>
> <br>
> Steps to reproduce: <br>
> <br>
> Try doIt this (for example, in a workspace): <br>
> <br>
> 2 raisedTo:: 3. <br>
> <br>
> <br>
> Expected behavior: <br>
> <br>
> 2 raisedTo:"Argument expected ->": 3. <br>
> <br>
> <br>
> Actual behavior: <br>
> <br>
> [IMAGE] <br>
> <br>
> If you are thumb enough to choose #raisedTo:: (I was), you get a subsequent error: <br>
> <br>
> [IMAGE] <br>
> <br>
> Even worse: If you try to doIt the same code snippet again, no parser warning/error will be raised at all but you get a runtime error: <br>
> <br>
> MessageNotUnderstood: SmallInteger>>raisedTo::. <br>
> <br>
> <br>
> Best, <br>
> <br>
> Christoph <br>
> <br>
> <br>
></div>
</blockquote>
</div>
</div>
</div>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>