help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Re: giving smalltalk python import


From: Paolo Bonzini
Subject: [Help-smalltalk] Re: giving smalltalk python import
Date: Wed, 8 Sep 2004 12:10:02 +0200

> It could be. There are some tradeoffs: its easier (and ease is
> important) to just write a script, and be able to move it on disk to
> have everything associated move, rather than have to create a formal xml
> file.=20

But a packages.xml file is actually quite simple and it can abstract away
the namespace and a few other boring details.  I already did this yesterday
evening as well.

> a smalltalkish version without xml might be:
> PackageLoader import: 'CVS'; import: 'RCS' !
>
> Namespace currentSpace at: #defaultModule put: CVS.abstractFactory !
>
> to do the same with xml you need

... this:

<package>
  <name>PackageName</name>
  <namespace>MyStuff</namespace>
  <filein>package.st</filein>
  <file>package.st</file>
</package>

> ==package.st==
> Namespace currentSpace at: #defaultModule put: CVS.abstractFactory !

Initialization like this is not very common in Smalltalk.

> which I think you'll agree is more work.

Maybe, but I want to minimize the amount of work for a first version.
Souping it up can be done later.

> why not a . ? (I dont' have anything against '/', but . has some
> advantages:
>
> * its the syntax used in the language to traverse namespaces

But here it's not namespaces, these are in packages.xml.  I fear confusion,
and I don't want to impose a one-one relationship between namespaces and
directories.

> Thats still quite manual: I'd like to see the loader just Do The Right
> Thing - do you think we could do that? (If we can conceptually do it,
> then we can worry about how to get there :}).

It will be easier than you probably think, hear me. :-)  And it can be made
even easier later.

Paolo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]