[squeak-dev] The Inbox: ShoutCore-tpr.59.mcz
Chris Muller
asqueaker at gmail.com
Thu Aug 17 04:28:09 UTC 2017
Since you're singing the blues, I'll join in. It's not a "obscene
spectacle of a Set with deliberately included nils", but *accidentally
included* since, as you said, it was relying on the old
implementation. It's accidental that they get in there now.
My whine is that it's too bad that Environment>>'declarations' is an
IdentityDictionary instead of just a plain ol'e Dictionary, so we
wouldn't need the send the expensive #asSymbol.
Using IdentityDictionary's "because the keys are gonna be Symbols" is
popular among developers, but I see no benefit. In fact, it
essentially exposes the internal implementation whilst inconveniencing
the senders. Better to inherit #= from Object (which defaults to ==)
so that the lower abstraction of #= can dictate what happens on a
per-object basis, dynamically.
On Wed, Aug 16, 2017 at 5:31 PM, <commits at source.squeak.org> wrote:
> tim Rowledge uploaded a new version of ShoutCore to project The Inbox:
> http://source.squeak.org/inbox/ShoutCore-tpr.59.mcz
>
> ==================== Summary ====================
>
> Name: ShoutCore-tpr.59
> Author: tpr
> Time: 16 August 2017, 3:31:37.498742 pm
> UUID: 88fc7c09-2574-451d-817f-2b1289f62ae7
> Ancestors: ShoutCore-ul.58
>
> #sharedPools was making a Set with included nils, which means that SHParserST80>resolvePartial: breaks when 'c sharedPools do:[.... is used.
> This change prevents the obscene spectacle of a Set with deliberately included nils.
>
> =============== Diff against ShoutCore-ul.58 ===============
>
> Item was changed:
> ----- Method: SHMCClassDefinition>>sharedPools (in category 'act like a class') -----
> sharedPools
> | d |
> d := Set new.
> classDefinition poolDictionaries do:[:each |
> + Smalltalk at: each asSymbol ifPresent:[:v| d add: v] ].
> - d add: (Smalltalk at: each asSymbol ifAbsent:[nil]) ].
> ^d!
>
>
More information about the Squeak-dev
mailing list
|