The Inbox: ShoutCore-tpr.59.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: ShoutCore-tpr.59.mcz

commits-2
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!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: ShoutCore-tpr.59.mcz

Chris Muller-3
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,  <[hidden email]> 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!
>
>