Squeak as Linux and other threads

Andreas Raab andreas.raab at gmx.de
Tue May 20 21:14:49 UTC 2003


Lex,

You are missing the entire point of my message, namely that this is NOT an
'either or' situation. In other words:

> Suppose I email someone about a package -- should I 
> use the name or the UUID?

I don't care the least bit! User either one. That's the whole point.

It is utterly trivial to put something like

loadPackage: packageRef
	self loadPackageWithUUID: packageRef asPackageReference uuid.

into those four or five places where it needs to be done. Then, all you need
is something like:

String>>asPackageReference
	^PackageReference named: self
UUID>>asPackageReference
	^PackageReference uuid: self
PackageReference>>asPackageReference
	^self
PackageReference>>uuid
	^uuid ifNil:[uuid := self resolveUUIDFromName]
PackageReference>>name
	^name ifNil:[name := self resolveNameFromUUID]

and *maybe* every now and then see that the name/uuid mapping is still
intact so that we don't use the wrong name for a particular package (which
can be done whenever you go to a server and need to retrieve something).
This allows people to use what they think works best in the context they're
in.

> I'd really like to use the name in pretty much every context, and
> probably most people are the same.  Is it really practical to 
> accomplish all the necessary programming wizadry so that UUID's
> never show up to the user?  I doubt it.

Okay, now you go and tell me what is wizardry about the above five methods
;-)

Cheers,
  - Andreas



> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Lex Spoon
> Sent: Tuesday, May 20, 2003 10:17 AM
> To: The general-purpose Squeak developers list
> Subject: RE: Squeak as Linux and other threads
> 
> 
> "Andreas Raab" <andreas.raab at gmx.de> wrote:
> 
> > > What would it mean to have a reference with both a UUID and a 
> > > name?  How do you perform the dereference when you are ready to
> > > download the real package object?
> > 
> > When you 'ultimately' dereference a package you do it by 
> UUID. However,
> > there are only very few places where this is required. For 
> everything
> > 'inbetween' you should use 'real objects' 
> (PackageReferences) which allow
> > you to think in whatever way is more convenient to you.
> > 
> 
> This is what I was calling a UUID-based scheme.  I dislike 
> that you have
> to use a "real object" just to *refer* to a package.  Names 
> are already
> bona fide references.
> 
> Remember that it's not just the package manager that will 
> touch package
> names.  Suppose I email someone about a package -- should I 
> use the name
> or the UUID?  Suppose a package name creaps into a method, perhaps as
> part of a name space.  Should I use the UUID or the name?
> 
> Just consider *entry* of a package reference by the user.  Do 
> I have to
> use a tool now to find the correct PackageReference object whenever I
> want to enter a package name somewhere?
> 
> I'd really like to use the name in pretty much every context, and
> probably most people are the same.  Is it really practical to 
> accomplish
> all the necessary programming wizadry so that UUID's never show up to
> the user?  I doubt it.
> 
> 
> Lex
> 



More information about the Squeak-dev mailing list