conversion instantiation (was "Integrating the RegisteringFileList")

Bijan Parsia bparsia at email.unc.edu
Tue Jan 22 20:58:08 UTC 2002


On Tue, 22 Jan 2002, Craig Latta wrote:

> 
> Hi--
> 
> 	I think >>asFoo messages are generally defensible as long as they're
> implemented such that they make sense for all possible receivers (that
> disqualifies most of the ones in Object :).

Hmm. Yes. There's a thread on comp.lang.smalltalk about #isFoo where
pollution is invoked. So it's not just "as", but "is", and I bet some
others.

[snip]
> 	In my experience, the number of conversions for which the
> "as<classname>" form is really most descriptive are few, and certainly
> not worth inventing tricky infrastructure. 

Sorry, I was really thinking of the more general situation (e.g., dealing
with #isFoo and other messages where one ends up with composed
names...maybe there's almost always a nice way out, I'm not sure).

> I'm willing to tolerate
> things like String>>asFilename (especially since they enable more
> compact chained-send expressions). But such stuff in Object which isn't
> meaningful for all objects just makes the system less readable. Anyway,
> much more common are cases where I want to convert something into
> another form which has a meaningful name within the terminology of the
> problem domain. For example, converting an Eye into a description of its
> geometry in a facial animation editor.

Yep.

> 	Bijan writes:
> 
> > Evidence suggests that a ban isn't going to cut it. So what's the solution?
> 
> 	I think it's just good case-by-case judgement, and not a simple
> generalization (because the problem isn't big enough to justify one).

Sounds right.

So long as I get #asUrl :)

Cheers,
Bijan Parsia.




More information about the Squeak-dev mailing list