[squeak-dev] FileList2>listForPattern(s): and MessageSend abuse

H. Hirzel hannes.hirzel at gmail.com
Thu Oct 5 20:03:18 UTC 2017


On 10/5/17, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
> I note that most references to FileList are for registering/unregistering a
> specific tool as a service for a specific fileType...
> So the goal is to make file services modular/pluggable/extendable.
> What I don't understand is that FileList seems to duplicate FileServices
> code (see for example implementors of #registerFileReader)...


FileServices was introduced with Squeak 3.9 in November 2006

 http://wiki.squeak.org/squeak/1001

> And that there is a random mixture of usage:
>
>     ChangeList class>>initialize
>         FileList registerFileReader: self
>
>     ChangeSet class>>initialize
>         "ChangeSet initialize"
>         AllChangeSets == nil ifTrue:
>             [AllChangeSets := OrderedCollection new].
>         self gatherChangeSets.
>         FileServices registerFileReader: self.
>
> What do you suggest instead? Who should survive?

> P.S.: it seems that we abused a bit of living system metaphor.
> It's like we wanted to create diversity in order to multiply the chances of
> squeak to survive ;)
> Unfortunately, natural selection of code doesn't obey fair rules:
> - code tends to bloat and complexify over years
>   that could be like our cells that gradually degenerate...
> - but the worse code (the most complex) tend to survive longer.
>   this is because it becomes more and more complex to change it without
> breaking features.
>   and breaking features is frowned upon...
>
> In biology, the immune system also help eliminating own degenerated cells.
> I don't see anything equivalent in Squeak.
> So the whole organism is in danger if we don't help the bad cells to die ;)
>
> 2017-10-05 20:04 GMT+02:00 tim Rowledge <tim at rowledge.org>:
>
>>
>> > On 04-10-2017, at 6:48 PM, Bob Arning <arning315 at comcast.net> wrote:
>> >>
>>
>> > Well, the whole point is to provide a view of the contents of a file
>> which you can read, edit and save. The rest is just how to get that
>> content
>> in the first place. So, it's a StringHolder with some extra buttons
>> attached.
>>
>> Ah, right, as previously mentioned a case of is-a or has-a. I much prefer
>> has-a myself.
>>
>>
>> tim
>> --
>> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
>> Oxymorons: New classic
>>
>>
>>
>>
>


More information about the Squeak-dev mailing list