|Pathologically Eclectic Rubbish Lister|
Re: Re: Re: Re: Teach him a lesson with factsby hardburn (Abbot)
|on Feb 23, 2003 at 05:16 UTC||Need Help??|
why don't they think in a systematic way???
Perl is a very practical language. There are plenty of times where, reading the docs, I've thought "why did they do it that way?" Then when I got to actually using the thing, it suddenly saw that doing it that specific way made coding a lot easier, and said "Ahh, that's why it works that way!"
So if it doesn't appear systematic, it's only because we don't live in a systematic world.
Perl's OO is hacked
Yes, it is. But did you also know that adding OO to Perl required defining precisely zero new syntax to the language? Which brings me to this:
There is a delimer for Perl, because the original design of this language is flawed, you have to either radically modify it, or to keep it familiar but with lots of hacking.
Not needing any new syntax for OO is a direct counterexample to this. By the time people started looking for OO to be added to Perl, closures, lexically scoped variables, packages, and referances were already in the language. These things comprise the building blocks of Perl OO (and probably a few other things I can't think of ATM). I think bless() had to be added, but that's a builtin subroutine, not new syntax.
The so called perlish style does not agree with maintainability at all, hope we at least agree with each other on this.
Are you talking about obfu/golf? If so, you're looking at the wrong place. Nobody is (should) be writing Perl that way for real programs. Look around this site, for instance. The community here hates it when people post code that isn't using strict and warnings--two ideas that generally get in the way of obfu/golf.
It is perfectly reasonable to write Perl code that looks just as pretty as a well-formatted Java code. All that is needed is a few rules about identation and spacing (I prefer K&R, myself). Regexen can be ugly, but they're equally ugly everywhere, as Java programmers are sure to (re)discover, since 1.4 now includes them. The /x modifier can help, if used properly.
Note: All code is untested, unless otherwise stated