[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Python or Perl for a Debian maintainance project?

Hi, Julian Mehnle wrote:

> Steve Greenland wrote:
>> to describe Perl's OOP system as anything except "kludgy and fragile" is
>> wishful thinking.
> I've read that multiple times now.  Unless I do have some reading problem,
> I haven't seen any founded justification for that assessment, though.

Well, I do agree with Steve.

Files, for instance, are objects in Perl. Except when they're GLOBs,
wait, OK, except when they're references to GLOBs.  :-P  There's no sane
way (one or two less-than-sane ones, though) to write a program which
accepts all three of these. There's no sensible way to figure out whether
file-thing A and file-thing B refer to the same file descriptor /
string-used-as-a-file / whatever.

Arrays and hashes are not objects. Neither are numbers. Oh, wait, you
can use bignums which happen to _be_ objects, and you can (via tie())
convince Perl to redirect all references to an array to your object
instead, but that's not quite the same thing.

Perl doesn't have class variables, or instance methods. In fact you can
argue that Perl doesn't have classes anyway; it's more like "a reference
to something which is stamped with a package name, which is where
functions are looked up if you pretend that you want to call a method".

(Yeah, of course Python has none of these problems, yadda yadda yadda ;-)

Matthias Urlichs

Reply to: