comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Object epiphany: A new way of building widget applications
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Object epiphany: A new way of building widget applications [message #24562 is a reply to message #24558] Wed, 04 April 2001 16:18 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"JD Smith" <jdsmith@astro.cornell.edu> wrote in message
news:3ACBA2EF.493F496F@astro.cornell.edu...
> Martin Schultz wrote:
>>
>> With almost a week delay, I finally get around to release the first
>> version of a new class of IDL objects: the MGS_GUIObject hierarchy.
>
> I think it only fair to let people know that I tend to shy away from
> distributed code with people's initials in the name. I know, it sounds
> stupid, but I'm not sure I'm the only one. It seems to be a reasonably
> common practice here (Craig, you listening?), but one which I think
> might be best to avoid, for the following reasons:

As one of the pioneers of this trend (he says modestly) may I present the
opposing viewpoint:

It's namespace management, pure and simple. It's desirable because IDL lacks
built-in facilities.

> 1. It conveys a sense of ownership or heavy expectations that are
> perhaps unjustified, and not intended. (Can I *change* such a routine,
> should I feel guilty, etc...).

Well, it's not *meant* to convey this.

> 2. It takes up space in a name which could perfectly well have been
> used for more descriptive characters.

Unfortunate, but true.

> 3. If the routine/class/function/widget name following, e.g., JDS, is
> so ambiguous as to require the initials to discriminate it from another
> of the same name, either the routine/class/function/widget isn't that
> useful, or its name is entirely too inspecific.

Didn't you have a "queue" & a "stack" class on your WWW page? Well. someone
did. I have written a stack class too. I call it "mgh_stack". It's a fairly
inspecific class, so I give it a suitably inspecific name and add my
initials on the front. What should I call it,
"this_is_a_different_stack_from_jds_one"? Or
"general_purpose_stack_with_whizzy_get_and_put_methods"?

> And the way I think
> about it, since IDL doesn't do any shadow checking (but cf. idlwave!),
> the *best* routine with a given generic name will rise to the top.

The one that rises to the top is somewhat unpredictable. (Well, strictly
speaking it's predictable because yuu can control your PATH, though I have
noticed recently that Windows 2000 expands path entries preceded by + in
*reverse* alphabetical order, which caused me some grief.) The thing is, I
don't remember exactly what is where on my PATH and I don't like relying on
the search order. I have been bitten by duplicated routine names a number of
times: CALDAT and CREATE_STRUCT are two I can remember.

> 4. The author(s) can always be found in a proper documentation header.

Sure, but it's not about claiming ownership, it's about namespace
management.

But hey, there's room for all points of view. If you don't prepend your
initials and I do, then our routine names will never clash.

Is there any other MGH out there?
---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: RE: 2D optimization for registration
Next Topic: Yes, there are tab widgets!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:28:24 PDT 2025

Total time taken to generate the page: 0.00452 seconds