[squeak-dev] Authorize upArrow in binary symbols

Tobias Pape Das.Linux at gmx.de
Mon Feb 24 18:55:00 UTC 2014


On 24.02.2014, at 19:52, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:

> Though being reserved for return statements, the upArrow ^ could perfectly be accepted as a character composing a binary selector, like the verticalBar | already is.
> Indeed there is no ambiguity, since the return ^ is always prefixed, while a binary message never is...
> (well, except in the method source, but method source must begin with selector, it cannot begin with a return statement, so no ambinguity there neither...).
> 
> I don't plan to use or add such selector in core Squeak/Pharo, but I think that it is important to allow a variety of selectors : it allows the most simple DSL : one using Smalltalk syntax (no need to define a new syntax, a new parser, etc...).
> If we did it for |, I don't see why we shouldn't for ^.
> Note that we recently also extended usage of - at any place in binary selectors (it was restricted to first position previously), though no core message is concerned so far.
> 
> The main objection could be that a missing period before a return statement won't be reported, but interpreted as a message send... like in:
>     x := a+b
>     ^x
> 
> But I don't think it's really a feature stopper.
> 
> It's very easy to modify the old Compiler and shouldn't be that hard in Opal too.
> I'll try and push a prototype in Squeak inbox this evening.
> 
> What do you think?

^ ^ v v < > < > b a.

Best
	-Tobias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1625 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140224/3939f287/signature.pgp


More information about the Squeak-dev mailing list