On 2/26/08, cdrick <cdrick65@gmail.com> wrote:
Hi

In a recent post, Matthew Fulmer explained how categories work... and
I don't really see why they exist this way... Can someone explain me
(historical reason, etc...)?


The only reason I could think of would be for speed. In the olden days, Smalltalk systems ran very slow, so code was often written in an inelegant but fast manner to get good performance.

I don't believe that the categories have been refactored much since they were originally designed back in the 80s.
 
Otherwise - yea, they're yuck. They would be difficult to refactor it in the squeak.org image because a lot of projects (namely, various browsers and tools) depend on their implementation.

Matthew also said we could adopt Namespace/Category like Gulik's work on
namespaces, as Namespaces are much like reified Categories.


My namespaces implementation replaces class categories, but doesn't (yet) do anything with method categories. I might leave method categories as they are for the meanwhile; it would be a low-priority refactoring to change them.

I'm never going to advocate integrating my Namespaces implementation into the squeak.org image. It would be a bad idea -- squeak.org needs to remain compatible with the large base of code out there, and my Namespaces solution breaks backwards compatibility. Instead, I'm making a fork of Squeak called SecureSqueak which will use Namespaces extensively.

Gulik. 


--
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/