Hi,
I've just tried to define a method with the binary selector #|@ but I does not compile. Are binary selectors that include $| not allowed in general or is this a parser bug? At least in my projects domain this message would be very convenient. Also I'd like to ask whether there is a chance to get #:: and other binary selectors including $: could be supported in a future release? Regards, Steffen _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
On 10/20/2011 08:22 AM, Steffen Märcker wrote:
> Hi, > > I've just tried to define a method with the binary selector #|@ but I does > not compile. Are binary selectors that include $| not allowed in general > or is this a parser bug? At least in my projects domain this message would > be very convenient. The ANSI spec calls for $| to be a valid binary selector character, so #|@ would be allowed under ANSI. I can confirm that it doesn't seem to work in VW, but does work in at least two other Smalltalk implementations. So I'd be inclined to agree that this is a bug, or at least a less-than-desirable feature. > > Also I'd like to ask whether there is a chance to get #:: and other binary > selectors including $: could be supported in a future release? $: is more problematic (and not specified by ANSI). For instance, if $: were considered a general-purpose binaryCharacter, := would be a valid binary selector, colliding with assignment. Even if := was special-cased, the use of $: in keyword selectors would probably break things somewhere. It's probably possible, but non-trivial and non-portable, to allow use of $: in binary selectors, with restrictions. I'd probably rather keep the rules simple and leave this one the way it is. Regards, -Martin _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
On Oct 20, 2011, at 2:33 PM, Martin McClure wrote: $: is more problematic (and not specified by ANSI). For instance, if $: /me shudders at the prospect of having the following two expressions be legal syntax that died at execution time 1) self foo: 42 2) self foo : 42 because the result of self foo did not understand #: OTOH, I'd be able to explore new emoticon based idioms self :o -- Travis Griggs Objologist Light travels faster than sound. This is why some people appear bright until you hear them speak... _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Martin McClure-3
Hi,
> The ANSI spec calls for $| to be a valid binary selector character, so > #|@ would be allowed under ANSI. I can confirm that it doesn't seem to > work in VW, but does work in at least two other Smalltalk > implementations. So I'd be inclined to agree that this is a bug, or at > least a less-than-desirable feature. I didn't try it in other dialects but I am not surprised that it works in some of them. I'd like to hear whether Cincom will support those selectors in the next release. =) > I'd probably rather keep the rules simple and leave this one the way it > is. I totally agree. Actually I asked for $: out of curiosity. =) Regards, Steffen Am 20.10.2011, 23:33 Uhr, schrieb Martin McClure <[hidden email]>: > On 10/20/2011 08:22 AM, Steffen Märcker wrote: >> Hi, >> >> I've just tried to define a method with the binary selector #|@ but I >> does >> not compile. Are binary selectors that include $| not allowed in general >> or is this a parser bug? At least in my projects domain this message >> would >> be very convenient. > > The ANSI spec calls for $| to be a valid binary selector character, so > #|@ would be allowed under ANSI. I can confirm that it doesn't seem to > work in VW, but does work in at least two other Smalltalk > implementations. So I'd be inclined to agree that this is a bug, or at > least a less-than-desirable feature. > >> >> Also I'd like to ask whether there is a chance to get #:: and other >> binary >> selectors including $: could be supported in a future release? > > $: is more problematic (and not specified by ANSI). For instance, if $: > were considered a general-purpose binaryCharacter, := would be a valid > binary selector, colliding with assignment. Even if := was > special-cased, the use of $: in keyword selectors would probably break > things somewhere. It's probably possible, but non-trivial and > non-portable, to allow use of $: in binary selectors, with restrictions. > I'd probably rather keep the rules simple and leave this one the way it > is. > > Regards, > > -Martin vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
I'd really like to hear a comment from Cincom as this. Is this considered
as a bug that will get your attention? Regards, Steffen Am 21.10.2011, 16:25 Uhr, schrieb Steffen Märcker <[hidden email]>: > Hi, > >> The ANSI spec calls for $| to be a valid binary selector character, so >> #|@ would be allowed under ANSI. I can confirm that it doesn't seem to >> work in VW, but does work in at least two other Smalltalk >> implementations. So I'd be inclined to agree that this is a bug, or at >> least a less-than-desirable feature. > > I didn't try it in other dialects but I am not surprised that it works in > some of them. I'd like to hear whether Cincom will support those > selectors > in the next release. =) > >> I'd probably rather keep the rules simple and leave this one the way it >> is. > > I totally agree. Actually I asked for $: out of curiosity. =) > > Regards, Steffen > > > > Am 20.10.2011, 23:33 Uhr, schrieb Martin McClure > <[hidden email]>: > >> On 10/20/2011 08:22 AM, Steffen Märcker wrote: >>> Hi, >>> >>> I've just tried to define a method with the binary selector #|@ but I >>> does >>> not compile. Are binary selectors that include $| not allowed in >>> general >>> or is this a parser bug? At least in my projects domain this message >>> would >>> be very convenient. >> >> The ANSI spec calls for $| to be a valid binary selector character, so >> #|@ would be allowed under ANSI. I can confirm that it doesn't seem to >> work in VW, but does work in at least two other Smalltalk >> implementations. So I'd be inclined to agree that this is a bug, or at >> least a less-than-desirable feature. >> >>> >>> Also I'd like to ask whether there is a chance to get #:: and other >>> binary >>> selectors including $: could be supported in a future release? >> >> $: is more problematic (and not specified by ANSI). For instance, if $: >> were considered a general-purpose binaryCharacter, := would be a valid >> binary selector, colliding with assignment. Even if := was >> special-cased, the use of $: in keyword selectors would probably break >> things somewhere. It's probably possible, but non-trivial and >> non-portable, to allow use of $: in binary selectors, with restrictions. >> I'd probably rather keep the rules simple and leave this one the way it >> is. >> >> Regards, >> >> -Martin > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Martin McClure-3
Martin McClure <martin.mcclure <at> vmware.com> writes:
> > On 10/20/2011 08:22 AM, Steffen Märcker wrote: > > Hi, > > > > I've just tried to define a method with the binary selector #|@ but I does > > not compile. Are binary selectors that include $| not allowed in general > > or is this a parser bug? At least in my projects domain this message would > > be very convenient. > > The ANSI spec calls for $| to be a valid binary selector character, so > #|@ would be allowed under ANSI. I can confirm that it doesn't seem to > work in VW, but does work in at least two other Smalltalk > implementations. So I'd be inclined to agree that this is a bug, or at > least a less-than-desirable feature. > Squeak suffers from the same limitations. Technically, such binary selectors cannot be formed at scan time, because they ambiguously could be an empty temp vars specification, or a local temp var specification in a block of arity>0. bugMe || ^self bugMeToo ^[:null || andVoid | andVoid := null] But of course, it would be possible to find a workaround... Nicolas _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Actually the workaround already exists, since at least in VW #| is a valid
binary selector, e.g. see Boolean. But I am surprised that longer selectors, e.g. #|@ or #@| are not accepted. When using a scanner, e.g. in LR parser, it might be indeed tricky to build the parser. But if you're using a scanner-less parser, e.g. PEG parsers, the ambiguity is resolved, since variable declarations appear always at the beginning of a method/block. Regards, Steffen Am 24.10.2011, 17:57 Uhr, schrieb nicolas cellier <[hidden email]>: > Martin McClure <martin.mcclure <at> vmware.com> writes: > >> >> On 10/20/2011 08:22 AM, Steffen Märcker wrote: >> > Hi, >> > >> > I've just tried to define a method with the binary selector #|@ but I >> does >> > not compile. Are binary selectors that include $| not allowed in >> general >> > or is this a parser bug? At least in my projects domain this message >> would >> > be very convenient. >> >> The ANSI spec calls for $| to be a valid binary selector character, so >> #|@ would be allowed under ANSI. I can confirm that it doesn't seem to >> work in VW, but does work in at least two other Smalltalk >> implementations. So I'd be inclined to agree that this is a bug, or at >> least a less-than-desirable feature. >> > > Squeak suffers from the same limitations. > > Technically, such binary selectors cannot be formed at scan time, > because they > ambiguously could be an empty temp vars specification, or a local temp > var > specification in a block of arity>0. > > bugMe > || > ^self > > bugMeToo > ^[:null || andVoid | andVoid := null] > > But of course, it would be possible to find a workaround... > > Nicolas > > > > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Steffen Märcker <merkste <at> web.de> writes:
> > Actually the workaround already exists, since at least in VW #| is a valid > binary selector, e.g. see Boolean. But I am surprised that longer > selectors, e.g. #|@ or #@| are not accepted. > When using a scanner, e.g. in LR parser, it might be indeed tricky to > build the parser. But if you're using a scanner-less parser, e.g. PEG > parsers, the ambiguity is resolved, since variable declarations appear > always at the beginning of a method/block. > > Regards, Steffen > Ah yes, of course, and that is quite easy to extend, I just did it in Squeak http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-October/162019.html cheers Nicolas _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |