Renaming - an alternative to dot notation

Joachim Durchholz joachim.durchholz at munich.netsurf.de
Tue Mar 23 18:31:24 UTC 1999


Allen Wirfs-Brock wrote:
> 
> ... There are basically two alternative approaches that have been
> applied to this problem in programming languages: explicit
> qualification and explicit renaming.
> 
> ...
> 
> There are pros and cons to both techniques and many languages include
> support for both.

What's the disadvantages of renaming?

Mind you I'm all for renaming. I've seen it work in Eiffel, and it is
much more flexible than explicit qualification. The most important
argument in favor of renaming is

>         Maluability - only a single place needs to be changed if
> modules are refactored.

- I have refrained from refactoring because I'd have had to touch just a
few dozen kilobytes of source code; this would have been *much* worse in
an environment where I don't even know all the code that's around!

Renaming can also be "abused" by specifying that two entities from
different sources are really to be considered the same. The exact
semantics of such a "join" can be very tricky, so this is nothing that
I'd aim at with the first try, but it's certainly worth the while to
investigate the possibilities.


BTW I don't think there are many languages that support explicit
qualification and renaming. Actually I haven't seen any... so Allen's
language background must be very different from mine.

Regards,
Joachim
-- 
Please don't send unsolicited ads.





More information about the Squeak-dev mailing list