List,
for a new project we plan to create a namespace which can and will have names clashing with existing global names like Object[tm] and Process[tm]. All behavior will be specified in form of Traits (for the immediate future only classTraits). We've looked around in the Traits implementation [3.9a] and found a good namespace separation example, [self environment organization], but there also is [SystemChangeNotifier uniqueInstance] which seems to know nothing about possible name clashes. What is the status, are the plans for having 100%[tm] separated namespaces? Google found - http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-December/085761.html was there anything else we should take care of? The new name space we have in mind derives from ontologies and we don't want to force users of an ontology namespace to prefix or suffix any names/identifiers. And while we are at it, how should an object (say, a Class) use objects from another namespace (say, a Traits), and what about namespace separation in #definitionST80. But perhaps there are other and/or better ideas on how to separate namespaces in Squeak, suggestions and/or experience, all appreciated. /Klaus P.S. Of course we already have some ideas (and working code examples) on how to address these issues but would naturally like to hear voices from the community. |
I would like to understand the proposal of goran, since I'm
***really*** relunctant to namespace introduction at the language level (when I see what we got in VW). Now we developed a class Namespace to support the system at the infrastructural level (having a class that plays the system dictionary role but only that one and not mixed with everything). You can find the code on squeaksource. Now the point is to pay attention that the system can absorb changes and evolved smoothly, for me the next challenge is the integration of packages (replacing category which could be only there when MC is not loaded) and speeding MC... Stef On 24 avr. 06, at 10:40, Klaus D. Witzel wrote: > List, > > for a new project we plan to create a namespace which can and will > have names clashing with existing global names like Object[tm] and > Process[tm]. All behavior will be specified in form of Traits (for > the immediate future only classTraits). > > We've looked around in the Traits implementation [3.9a] and found a > good namespace separation example, [self environment organization], > but there also is [SystemChangeNotifier uniqueInstance] which seems > to know nothing about possible name clashes. > > What is the status, are the plans for having 100%[tm] separated > namespaces? Google found > - http://lists.squeakfoundation.org/pipermail/squeak-dev/2004- > December/085761.html > was there anything else we should take care of? > > The new name space we have in mind derives from ontologies and we > don't want to force users of an ontology namespace to prefix or > suffix any names/identifiers. > > And while we are at it, how should an object (say, a Class) use > objects from another namespace (say, a Traits), and what about > namespace separation in #definitionST80. > > But perhaps there are other and/or better ideas on how to separate > namespaces in Squeak, suggestions and/or experience, all appreciated. > > /Klaus > > P.S. Of course we already have some ideas (and working code > examples) on how to address these issues but would naturally like > to hear voices from the community. > > |
Hi fellas!
On 24 avr. 06, at 10:40, Klaus D. Witzel wrote: > What is the status, are the plans for having 100%[tm] separated > namespaces? And... =?ISO-8859-1?Q?st=E9phane_ducasse?= <[hidden email]> wrote: > I would like to understand the proposal of goran, since I'm > ***really*** relunctant to namespace introduction > at the language level (when I see what we got in VW). My Namespaces code (hmmm, did I update it on SM? Nope, doesn't look that way, sorry, will put it up there) was refreshed to work in 3.9 when I was in Brussels recently and presented it to the people attending that Smalltalk party. Other people attending can comment on it - but unfortunately I managed to break the code right before the talk so I couldn't demo it - but it worked 30 minutes later when I discovered what I had done. ;) I very much want to make that code as good as possible so that the community can decide if we want to use it or not. I personally think it is a simple and very nice way of dealing with the problem. There are also numerous writeups about it, the latest here: http://swiki.krampe.se/gohu/32 Note that my solution does not attempt to solve All Aspects Under The Sun Related To Whatever People Think Of When You Mention The Word Namespace, but only a rather well defined subset in a well defined and backwards compatible way. :) regards, Göran |
thanks goran I will read that :)
Stef > also numerous writeups about it, the latest here: > > http://swiki.krampe.se/gohu/32 > |
In reply to this post by Klaus D. Witzel
Hello,
I am maintaining the SystemChangeNotifier, so I am interested in the discussion. Could you elaborate a bit more on SystemChangeNotifier and name clashes, since I did not quite follow you there. Regards, Roel On 24 Apr 2006, at 10:40, Klaus D. Witzel wrote: > List, > > for a new project we plan to create a namespace which can and will > have names clashing with existing global names like Object[tm] and > Process[tm]. All behavior will be specified in form of Traits (for > the immediate future only classTraits). > > We've looked around in the Traits implementation [3.9a] and found a > good namespace separation example, [self environment organization], > but there also is [SystemChangeNotifier uniqueInstance] which seems > to know nothing about possible name clashes. > > What is the status, are the plans for having 100%[tm] separated > namespaces? Google found > - http://lists.squeakfoundation.org/pipermail/squeak-dev/2004- > December/085761.html > was there anything else we should take care of? > > The new name space we have in mind derives from ontologies and we > don't want to force users of an ontology namespace to prefix or > suffix any names/identifiers. > > And while we are at it, how should an object (say, a Class) use > objects from another namespace (say, a Traits), and what about > namespace separation in #definitionST80. > > But perhaps there are other and/or better ideas on how to separate > namespaces in Squeak, suggestions and/or experience, all appreciated. > > /Klaus > > P.S. Of course we already have some ideas (and working code > examples) on how to address these issues but would naturally like > to hear voices from the community. > > |
Hi Roel,
on Mon, 24 Apr 2006 17:48:27 +0200, you wrote: > Hello, > > I am maintaining the SystemChangeNotifier, so I am interested in the > discussion. Thank you for taking care! > Could you elaborate a bit more on SystemChangeNotifier and name clashes, > since I did not quite follow you there. Now that I reread my posting I see that I should have written "namespace separation" instead of "name clashes" when I mentioned SystemChangeNotifier. Apologies! But anyways, here is how we stumbled on SystemChangeNotifier. We checked the classes in System-Change Notification (and also class ModifiedTraitDefinitionEvent) to find out what happens when the namespace of an entity (Class or Traits) is changed. We couldn't find evidence that such a change is recognized. So possibly [SystemChangeNotifier uniqueInstance allSystemEvents] and #notify:ofAllSystemChangesUsing: do not handle such a situation? Perhaps [oldItem environment] and [newItem environment] would fit the bill, dunno. In any case, namespace changes (of classes and/or traits) seem not to be captured nor reported. There currently is no urgence for system change notification to take care of namespace changes, we can live with the "manual" design+development rule: take care with namespaces and system change notification. But for (multiple) namespaces to be useful painlessly, sooner or later support from system change notification is neccessary. Hope this clarifies a bit. /Klaus |
In reply to this post by stéphane ducasse-2
Hi Stef,
on Mon, 24 Apr 2006 11:29:50 +0200, you wrote: > I would like to understand the proposal of goran, since I'm ***really*** > relunctant to namespace introduction > at the language level (when I see what we got in VW). We are not interested in support at the language level, need support only for class/traits definition, DoIt evaluation and source code compilation. > Now we developed a class Namespace to support the system at the > infrastructural level (having a class that plays the system > dictionary role but only that one and not mixed with everything). You > can find the code on squeaksource. Thanks for the hint, found it at http://www.squeaksource.com/Namespace and will have a look at it. > Now the point is to pay attention that the system can absorb changes and > evolved smoothly, for me the next challenge > is the integration of packages (replacing category which could be only > there when MC is not loaded) and speeding > MC... I'm sorry, please don't misunderstand: MC is not our priority. Thanks again! /Klaus |
In reply to this post by Göran Krampe
Hi Göran,
on Mon, 24 Apr 2006 13:26:40 +0200, you wrote: > ... > My Namespaces code (hmmm, did I update it on SM? Nope, doesn't look that > way, sorry, will put it up there) was refreshed to work in 3.9 when I > was in Brussels recently and presented it to the people attending that > Smalltalk party. Other people attending can comment on it - but > unfortunately I managed to break the code right before the talk so I > couldn't demo it - but it worked 30 minutes later when I discovered what > I had done. ;) > > I very much want to make that code as good as possible so that the > community can decide if we want to use it or not. I personally think it > is a simple and very nice way of dealing with the problem. There are > also numerous writeups about it, the latest here: > > http://swiki.krampe.se/gohu/32 Ah, that's a good one. Comes close to what we have in mind, i.e. let the compiler do it: !SystemDictionary methodsFor: 'namespace support'! >> aSymbol ^ self at: aSymbol! ! ...which is complemented by new method #traitCompositionString, in which names are automagically prefixed, like ^ self environment == Smalltalk ifTrue: [self name] ifFalse: ['(', (Smalltalk keyAtValue: environment), '>>', self name, ')'] ! ! > Note that my solution does not attempt to solve All Aspects Under The > Sun Related To Whatever People Think Of When You Mention The Word > Namespace, but only a rather well defined subset in a well defined and > backwards compatible way. :) :) /Klaus |
In reply to this post by Klaus D. Witzel
Hi Klaus-- FYI, in Spoon[1], methods are transferred between systems without using class names at all. The Quoth application, for example, has many classes which don't have names to begin with (they have nil in the name slot). When a person writes a method interactively, the compiler could just prompt for a choice when it encounters a name for which there are multiple classes. On display, browsers could use some visual cue (e.g., a hyperlink) when displaying a class name that is shared by multiple classes. The person using the browser could then ask for more information (e.g., by clicking the visual cue). One could, of course, group class objects in useful ways (somewhat like class categories); but there is no need for namespaces in the traditional sense in Spoon, because the name of each class is completely unconstrained. -C [1] http://netjam.org/spoon -- Craig Latta improvisational musical informaticist www.netjam.org Smalltalkers do: [:it | All with: Class, (And love: it)] |
Hey Craig,
long time no see! I'm still keen to make use of visualizing object memory (and perhaps run a contest :) On Mon, 24 Apr 2006 20:48:12 +0200, you wrote: > ... > FYI, in Spoon[1], methods are transferred between systems without using > class names at all. The Quoth application, for example, has many classes > which don't have names to begin with (they have nil in the name slot). Yes, I remember having read that somewhere sometime ago. > ... > One could, of course, group class objects in useful ways (somewhat like > class categories); but there is no need for namespaces in the > traditional sense in Spoon, because the name of each class is completely > unconstrained. Will come back to your approach once we can show a prototype. Then we can exchange ideas+solutions using a running system (image's worth 1000k words ;) /Klaus |
In reply to this post by Klaus D. Witzel
Ok, I'll have a look at changes to the environment and trigger a
change for that. No promises on exactly when I will add this (unless the community has a real urgency for this trigger). On 24 Apr 2006, at 19:23, Klaus D. Witzel wrote: > Hi Roel, > > on Mon, 24 Apr 2006 17:48:27 +0200, you wrote: > >> Hello, >> >> I am maintaining the SystemChangeNotifier, so I am interested in >> the discussion. > > Thank you for taking care! > >> Could you elaborate a bit more on SystemChangeNotifier and name >> clashes, since I did not quite follow you there. > > Now that I reread my posting I see that I should have written > "namespace separation" instead of "name clashes" when I mentioned > SystemChangeNotifier. Apologies! But anyways, here is how we > stumbled on SystemChangeNotifier. > > We checked the classes in System-Change Notification (and also > class ModifiedTraitDefinitionEvent) to find out what happens when > the namespace of an entity (Class or Traits) is changed. We > couldn't find evidence that such a change is recognized. So > possibly [SystemChangeNotifier uniqueInstance allSystemEvents] and > #notify:ofAllSystemChangesUsing: do not handle such a situation? > Perhaps [oldItem environment] and [newItem environment] would fit > the bill, dunno. In any case, namespace changes (of classes and/or > traits) seem not to be captured nor reported. > > There currently is no urgence for system change notification to > take care of namespace changes, we can live with the "manual" design > +development rule: take care with namespaces and system change > notification. > > But for (multiple) namespaces to be useful painlessly, sooner or > later support from system change notification is neccessary. > > Hope this clarifies a bit. > > /Klaus > > |
Thank you Roel, we'd communicate requirements (in form of suggestions +/-
code snippets) once it makes sense (stability, robustness). /Klaus On Tue, 25 Apr 2006 09:18:57 +0200, Roel Wuyts <[hidden email]> wrote: > Ok, I'll have a look at changes to the environment and trigger a change > for that. No promises on exactly when I will add this (unless the > community has a real urgency for this trigger). ... |
Free forum by Nabble | Edit this page |