[PD-dev] removing files from externals/build/src
Hans-Christoph Steiner
hans at eds.org
Tue Dec 13 06:34:15 CET 2005
On Dec 12, 2005, at 1:41 AM, Mathieu Bouchard wrote:
> On Mon, 12 Dec 2005, Hans-Christoph Steiner wrote:
>> I agree that this should be avoided. For example, in Java, which I am
>> using as my namespace example, when they made javax.swing to replace
>> java.awt, the objects that did the same thing were named differently
>> (java.awt.MenuItem --> javax.swing.JMenuItem) even though both could
>> have been called MenuItem and it would have worked. Its clearer to
>> have
>> the objects with different yet related names.
>
> What happened there? is it that typically people need to import both
> java.awt and javax.swing in order to do anything with SWING ? In that
> case
> it's almost as if they were in the same namespace. However, I figure
> writing "javax.swing.MenuItem" is as clear to Java programmers, and I
> can't imagine them trying to come up with shorter identifiers.
AWT and Swing are generally not used together, but can be in a kludgey
way.
> What's the psychology behind "J"-prefixing in Java?
> Really?
>
>>> Yeah but this is another thing. Most "libraries" in Pd world are not
>>> functional entities. They just happen to be written by the same
>>> author.
>
> Even libraries that are assumed to have some kind of functional unity
> normally don't. A lot of C libraries reinvent OOP, dynamic typing,
> etc.;
> in Java those features are built-in, but that just moves the
> phenomenon at
> another level, though usually to a lesser extent.
>
>> Then if you have a library, and you want want to use its method of
>> sending and
>> receiving, the object name would be obvious. But this would have the
>> disadvantage of becoming unclear when someone does this:
>> [import net]
>> | [receive foo]
>> [send foo] |
>
> Without [import net] those would refer to the usual [send] and
> [receive] that we also know as [s] and [r]. Questions:
>
> 1. What would be the way to use a toplevel name like "send",
> overriding an
> import directive? [/send] (leading slash) ?
Like Java, C, etc., only the bare minimum would be in the "toplevel".
So send/receive would be like [pd/send] or [pd/receive] or maybe
[core/send], or whatever.
> 2. Would it be a good idea to have aliases propagate across namespaces,
> such that [s] in this case would refer to [netsend] ? And then
> would it
> be feasible?
Personally, I am not a fan of abbreviations, I think they are messy and
provide basically no real benefit. Most programming languages just
have one name per function, not a bunch of aliases too.
.hc
________________________________________________________________________
____
"I have the audacity to believe that peoples everywhere can have three
meals a day for their bodies, education and culture for their minds,
and dignity, equality and freedom for their spirits."
- Martin Luther King, Jr.
More information about the Pd-dev
mailing list