On Dec 21, 2006, at 11:24 AM, David Cantrell wrote:
A general purpose language which can't be used in different ways to
solve different problems is not fit for purpose.
In Perl, "there's more than one way to do it" does not mean "Perl can
be used in different ways to solve different problems", it means "Perl
has multiple redundant syntaxes for writing the exact same code to
solve the same problem for the same purpose".
Allowing "if" and "unless" does not increase the expressive power of
Perl one jot not tittle. It just increases the complexity. But just to
make it really hateful, there's no way to write a "switch" statement in
Perl that doesn't step on some bit of syntax somewhere else in the
language.
Are you proposing that
programming languages should be rigid and unsuitable for a wide range
of
tasks?
No, because that would mean I'd want programming languages like Perl.
Give me a language with simple syntax that supports things like
introspection and reflection, so I can *create* new ways of doing
things when *I* need to. For example, it's trivial to write an
efficient and consistent "switch" statement... even one that can
compile to a branch tree or a jump table depending on the domain and
range of the variable being selected on... in just about any decent
reflective language.