[PD-dev] pd-extended loadlib request
Mathieu Bouchard
matju at artengine.ca
Sun Jan 27 18:43:00 CET 2008
On Fri, 25 Jan 2008, Chris McCormick wrote:
> 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).
Onr reason thay it might not worth mentioning here is that the topic is
plain aliases: two names for exactly the same thing. In Perl you have
considerable overlap of the base constructs, but nothing that completely
coïncides. Furthermore it's difficult to decide whether that should be
compared, because pd is a language in which the equivalents of most base
constructs of Perl are fitting in the pattern of classes and objects: in
terms of syntax, Perl and Ruby are large languages, whereas Pd is a very
small language, just like Forth, Scheme, Tcl. (Ruby is syntactically large
even though many more things are fitting in the class/object pattern than
in most other languages... it's that Perl influence).
> Many languages have a shortened form of if statement that is effectively
> a low-syntax alias for the regular if statement.
Many also have && and ||, which are also kinds of "if"s, but it's most
flexible in Perl/Ruby, in which those two operators have arbitrary return
values instead of just bool, so they can more often be used in practice
than in other languages. They have aliases called "and" and "or" which are
not plain aliases because they also have different operator precedence.
Both languages have a bunch of if-constructs like that but they all cover
different syntactic combinations so e.g.
b if a
is not completely equivalent to:
if a then b end
because it's a different order, but then it depends what you want to
figure out about redundancy. Maybe we want to categorise language
redundancy in a way like this:
1. totally the same use, different name
2. different syntax, different order of arguments, etc.
3. less obvious equivalences (a combination of two constructs is
equivalent to another construct or to a combination of two other
constructs)
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
More information about the Pd-dev
mailing list