[squeak-dev] Re: Monticello doesn't create new packages (comment on bert's suggestion)

Bert Freudenberg bert at freudenbergs.de
Tue Jun 3 09:01:12 UTC 2008


On 03.06.2008, at 00:25, Jerome Peace wrote:

>
>
> [squeak-dev] Monticello doesn't create new packages
>
> ***
>> Bert Freudenberg bert at freudenbergs.de
>> Mon Jun 2 10:18:52 UTC 2008
>>
>> On 02.06.2008, at 11:06, Herbert König wrote:
>>
>>> <much original stuff snipped>
>
>> Or, if you like substring matching better than token matching,  
>> include
>> your own PackageInfo subclass with your package. It is really simple.
>> Here is the default matching:
>>
>> category: categoryName matches: prefix
>> 	^ categoryName notNil and: [categoryName = prefix or: [categoryName
>> beginsWith: prefix, '-']]
>>
>> Make a PI subclass, override the method as
>>
>> category: categoryName matches: prefix
>> 	^ categoryName notNil and: [categoryName beginsWith: prefix]
>>
>> and then in its class-side initialize method, do
>>
>> 	(self new packageName: 'hk-aster') register
> ***
>
> Arrrg.
>
> Isn't the naming convention part of the external language of squeak?
>
> That is, something we all must argee upon*
> inorder for packages to be interchangable?
>
> Making one's own convention only works on one's own island.
> When it comes time to share the problem of dealing
> with external language remains.
>
> So it sort of destroys the whole virtue of packages in the first  
> place.


I think you misunderstood my code. This special naming convention  
would only apply to this special package.

It is called "object-orientation". The object (package) decides what  
classes and methods belong to it. The new PackageInfo subclass is  
inside the package, so when you get the package, you get that new  
object, too. Saving the package again will work just fine, nothing in  
the system is changed.

In fact, there are already packages out there that come with their own  
PackageInfo class (e.g., Seaside), and because the user does not feel  
any change, it is just fine. But most people are not aware of the  
flexibility of the PackageInfo approach, so I think pointing it out  
once in a while is in order.

- Bert -





More information about the Squeak-dev mailing list