Prevent cloning of clones

Brian Rice water at tunes.org
Tue Apr 26 16:35:45 PDT 2005


On Apr 26, 2005, at 1:54 PM, Brian Rice wrote:
> On Apr 26, 2005, at 1:37 PM, Adde wrote:
>> It's highly likely that this is just me programming over-defensively. 
>> I've spent a considerable part of my life trying to please C++.
>> But, I feel that the only Units that should be used with toXML are 
>> Units for which someone has specified an XML representation 
>> (overridden toXML). Lengths counts as SVG units the second someone 
>> specifies how a Length should be formatted in in an SVG Document.
>> This feels like a problem that's bound to come up again, that you 
>> wan't to add special formatting to specific kinds of Units (instead 
>> of adding it to BaseUnit).
>> I fully agree that the Pixel unit probably belongs in some kind of 
>> Graphics namespace, though.
>
> Fair enough. I can add Length/other-dimension subtypings for the 
> various kinds of units for dispatch hooks.

I'm going to delay adding this yet, as I'm not sure if it'd work fine 
in the obvious manner, although there is already TemperatureUnit 
distinguished from other types. It'll probably happen soon.

> On a related note, the with: message is supposed to work with 
> arbitrary objects (e.g. "4 with: lobby" should turn into "4 lobbies"), 
> and doesn't, so I'll fix that while my mind is on it as well.

This is done, although I backed away from the printout style. I also 
renamed with: to of: since it reads better (and we have other selectors 
with with: keywords). Now it'll do "4 of: Namespace" for "4 of: lobby" 
- it's not terribly good, just counting things that satisfy isSameAs: 
but that can be parametrized. I'm sure I won't hear about this feature 
for a few months at least, though.

--
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/




More information about the Slate mailing list