|
Re: cloning/invocation: msg#01391lang.smalltalk.squeak.general
On Saturday, August 31, 2002, at 12:36 Uhr, Jecel Assumpcao Jr wrote: I am saying that I want something like (1) to be usable with objects Before I start answering, just a short note to the status of this work: it is currently part of a system built on top of an existing language (Objective-C, though ST would make parts easier), not a new language. I am groping forward very slowly, because the aim is to build something that is useful in the context of the system... At present, parameters aren't aren't associated with classes as such. Instead parameterized objects (templates) are created from existing objects by adding slots. A slot has a name and a key-value path to the object it replaces. They key-value path means that the replacement can affect sub-structure. I can currently get away with not copying the object because in the current system, all I actually do with the object that is relevant is output it to a graphics-stream, so the context-evaluation takes place on output only. I probably will have to change that in the near future, though. To avoid copying in that case, I would either need (a) proxy-objects that get placed in the slots or (b) a more general languge mechanism that adds a lookup-layer, but that probably isn't going to happen in Objective-C. The Smalltalk way would be for them to be initialized to nil, I I wouldn't do that, even though it may look a bit like it at first. The thing to understand is that this isn't "new object creation". It is "definition". Object A *is* Parametrized Object B with parameters c=C and d=D. Think of it as the difference between putting a literal object someplace vs. code that constructs the object. For example, constructores always create an object. This is not necessarily the case here. If Parametrized Object B has parameters c and d, and I only give it a value for parmeter c, then I don't get a fully funcioning instance, I get a new parametrized object with parameter d. (That's the 'currying' aspect I was refering to). Furthermore, it is always possible to turn any object into a parametrized object by adding a slot to it (the slot turns an attribute or sub-structure into a parameter), so there is a back and forth between levels of abstraction (or meta-levels). I also call this little engine the "AbstractionEngine". The back-and-forth aspect also means that you can create long reference chains, with a parameter being introduced and bound over and over again. There probably needs to be a mechanism to simplify such chains, but that problem is a long way off for now. Well, I have a bit of a problem with a "unifying mechanism" that is So the debugger synthesizes a view of the system that doesn't exist otherwise? I was just following up on Alan's comments about "Exemplars". Not Thanks for the reference! I haven't read this paper since 1987, so while I can't remember any I'll check it out. Regards, Marcel -- Marcel Weiher Metaobject Software Technologies marcel@xxxxxxxxxxxxxx www.metaobject.com Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [BUG?]Upgrading 3.2 to 3.3alpha, Roger Vossler |
|---|---|
| Next by Date: | Re: [BUG?]Upgrading 3.2 to 3.3alpha, Andrew C. Greenberg |
| Previous by Thread: | Re: cloning/invocation, Jecel Assumpcao Jr |
| Next by Thread: | [FIX] TransfoimingAMorphFix, KURIHARA Tetsuya |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |