PharoCompatibility (was Re: NBHelp in Squeak (Re: [squeak-dev] Re: Why FFI is not included with latest squeak ?))

David T. Lewis lewis at mail.msen.com
Sun Aug 26 23:08:21 UTC 2012


On Sun, Aug 26, 2012 at 10:51:43PM +0100, Frank Shearar wrote:
> On 26 August 2012 22:50, Chris Muller <asqueaker at gmail.com> wrote:
> > We have Symbol>>#isKeyword and #isUnary but you didn't complain about those..

You're right, we have #isUnary and #isInfix. In my opinion #isBinary is
not as good a name as #isInfix in this context. But I'm not complaining
and I don't object to adding #isBinary.

> >
> > One of the first things learned by new Smalltalkers is that selectors
> > are Symbols and there are three types of selectors.  IMO, #isBinary is
> > long overdue to be included in the API.
> 
> Hm, if only there was an implementation in the Inbox, together with a
> test suite... :)

Thanks Frank, It looks good to me, especially the test suite :)

+1 on adding moving it to trunk.

Dave

> 
> frank
> 
> > On Sun, Aug 26, 2012 at 1:40 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> >> On Sun, Aug 26, 2012 at 03:28:37PM +0200, Levente Uzonyi wrote:
> >>> On Sun, 26 Aug 2012, Frank Shearar wrote:
> >>>
> >>> >On 25 August 2012 22:12, H. Hirzel <hannes.hirzel at gmail.com> wrote:
> >>> >>Igor,
> >>> >>
> >>> >>Below are the instructions for loading PetitParser manually. NBHelp
> >>> >>needs PetitParser.
> >>> >>The Monticello configuration needs to be adapted so that it works fine
> >>> >>for Squeak as well.
> >>> ><snip>
> >>> >>How to load NBHelp in Squeak 4.3
> >>> >>================================
> >>> >>
> >>> >>Load Pharo compatibility package for Squeak
> >>> >>-------------------------------------------
> >>> >>
> >>> >>Load
> >>> >>[PharoCompatibility](http://www.squeaksource.com/PharoCompatibility)
> >>> >>by Frank Shearar
> >>> >>
> >>> >>This package contains as the only method
> >>> >>
> >>> >>    Symbol>>isBinary
> >>> >>        ^ self precedence = 2.
> >>> >
> >>> >Are there any objections to folding this single method into trunk?
> >>>
> >>> I'd like to see a comment about what it means and that it's the same as
> >>> #isInfix. Maybe the implementation could be simply: ^self isInfix
> >>>
> >>
> >> +1 to a good comment.
> >>
> >> I would not object to including Symbol>>isBinary if it helps compatibility,
> >> but I can't help but point out that it seems to a poor naming choice. What
> >> in the world is a "binary symbol"? From the name alone I would have inferred
> >> a symbol with two possible states, such as #true and #false. The name #inInfix
> >> is better because it gives a clue to the reader, who may understand that "infix"
> >> has something to do with parsing as opposed to the general concept of binary-ness.
> >>
> >> Dave
> >>
> >>
> >


More information about the Squeak-dev mailing list