[PD-dev] pd-extended loadlib request
Hans-Christoph Steiner
hans at eds.org
Sat Jan 26 18:44:14 CET 2008
On Jan 25, 2008, at 8:36 PM, Chris McCormick wrote:
> On Thu, Jan 24, 2008 at 02:31:26PM -0500, Mathieu Bouchard wrote:
>> On Wed, 23 Jan 2008, Hans-Christoph Steiner wrote:
>>
>>> What other programming language has aliases?
>>
>> Ruby accepts both 'indices' and 'indexes' as selectors in the
>> Array and
>> Hash classes. Ruby has 'alias' as a reserved word.
>>
>
> Perl has so many redundant language constructs for doing the same
> thing
> multiple ways that it's not even worth mentioning them all (And
> that is
> considered by Perl programmers as a major feature of the language).
>
> PHP has aliases for heaps and heaps of functions (eg is_int ==
> is_integer).
>
> Haskell's 'type' keyword effectively creates an alias from sub-types.
>
> Javascript has the 'with' statement that is similar to aliasing and JS
> also allows you to declare variables/functions/objects in multiple
> ways
> with different syntax.
>
> Many languages have a shortened form of if statement that is
> effectively
> a low-syntax alias for the regular if statement.
Things like #define, #typedef, 'type', etc. are different than Pd's
aliases like [f] and [float]. Setting a variable to a function name
is also not the same as a permanent alias.
I think these things are useful, while Pd's aliases only save typing
a couple of keystrokes. If that happened without causing harm, then
I wouldn't have a problem with it. Saving time in making a working
program is far more valuable. I think Pd's aliases add work by
increasing confusion. For example, everyone says "trigger" yet most
people type [t]. Everyone who's responded to this thread
unconsciously knows the two are one, but it took us a while to learn
that.
As for the layout issues, I think it is akin to segmented patch
cords. Why include a feature that encourages bad form 95% of the
time? Using [t a b b] vs. [trigger anything bang bang] encourages
people to cram lots of stuff into a patch, and to cross cords, when
they should be laying things out cleanly and grouping logical chunks
into subpatches.
.hc
------------------------------------------------------------------------
----
http://at.or.at/hans/
More information about the Pd-dev
mailing list