Faithless matters of Python and Perl

: : Yeah, but aren't the underscores in Python ugly? Admittedly, the
: : bless keyword isn't obvious in it's function, though.
: Ugly? I don't think so. Maybe I'm just used to them. And it's only
: on "special" methods of classes that they are required.
I guess it's all a matter of taste. If everyone had the same definition of attractive and ugly the we'd surely have problems. :-)

: : : Of course, dynamically typed scripting languages are the coolest.
: : I guess we could call them evolved scripting languages; I tend to
: : consider Perl a fully fledged programming language these days.
: Absolutely. Same with Python.
:
: : : Not sure about Ruby, though :-P
: : Haven't seen much of it. Somebody once described it as "OO Perl",
: : but I think there's something more to it than that!
: Not from what I've seen. It's like they took Python and gave it Perl
: syntax. Took away the "ugly" underscores and gave it @s and $s, etc.
I guess some could say it takes the best bits of both of them.

: There are Ruby fans who are so anti-Python, they claim that Ruby is
: SO much easier to understand than Python. I think they're a bit
: loopy.
I stand by my sigils - I think they're a Good Thing. Being anti-[insert programming language here] is probably a bit silly though! I don't care much for Pascal, but I wouldn't say I'm an antipascalarian.

Jonathan

###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Comments

  • : I stand by my sigils - I think they're a Good Thing. Being anti-[insert programming language here] is probably a bit silly though! I don't care much for Pascal, but I wouldn't say I'm an antipascalarian.

    A lot of Rubians seems to be violently against the Pythonistas' double-underscores and all gushy over the goofy Perlesque symbols being visual cues to scope and blah blah blah. I personally like the Pythonista viewpoint of "who cares if it's a list if it acts like one when you need it to."


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

  • : : I stand by my sigils - I think they're a Good Thing. Being anti-
    : : [insert programming language here] is probably a bit silly
    : : though! I don't care much for Pascal, but I wouldn't say I'm an
    : : antipascalarian.
    :
    : A lot of Rubians seems to be violently against the Pythonistas'
    : double-underscores
    Well, I wasn't massively impressed by them. In Perl if any method is really special it has its name all in uppercase. And by really special I mean it is called by the Perl runtime itself, not from within the program. The constructor can take any name it likes.

    : and all gushy over the goofy Perlesque symbols being visual cues to
    : scope and blah blah blah.
    I find that the ability to interpolate variables into output is a good enough reason for sigils alone. It's highly useful in web development. The fact that they give visual clues about context (rather than scope) can be useful too. You don't have to go hunting to find out whether you're dealing with a scalar, a list or a hash. It also means you can have $value (scalar), @value (array) and %value (hash) co-existing and they won't have any releation to each other. I'm not certain whether that's a Good Thing, mind.

    : I personally like the Pythonista viewpoint of "who cares if it's a
    : list if it acts like one when you need it to."
    That's a fair enough point too. I'd say it's nice to be able to look at something and say "ah, it will act that way" without having to trace back through the program to find out what it is, though.

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • : : A lot of Rubians seems to be violently against the Pythonistas'
    : : double-underscores
    : Well, I wasn't massively impressed by them. In Perl if any method is really special it has its name all in uppercase. And by really special I mean it is called by the Perl runtime itself, not from within the program. The constructor can take any name it likes.

    I kind of like them. They're only required for built-in class methods, so when you see them, you can be pretty certain they're something special. I guess I'm just used to them, though.

    : : and all gushy over the goofy Perlesque symbols being visual cues to
    : : scope and blah blah blah.
    : I find that the ability to interpolate variables into output is a good enough reason for sigils alone. It's highly useful in web development. The fact that they give visual clues about context (rather than scope) can be useful too. You don't have to go hunting to find out whether you're dealing with a scalar, a list or a hash. It also means you can have $value (scalar), @value (array) and %value (hash) co-existing and they won't have any releation to each other. I'm not certain whether that's a Good Thing, mind.

    Doesn't sound like a Good Thing. Maybe a useful thing, maybe not. I prefer naming variables appropriately, like lists are always plurals.

    : : I personally like the Pythonista viewpoint of "who cares if it's a
    : : list if it acts like one when you need it to."
    : That's a fair enough point too. I'd say it's nice to be able to look at something and say "ah, it will act that way" without having to trace back through the program to find out what it is, though.

    That's a reasonably valid argument, but in practice, I wonder how useful it really is. If you follow good coding practices, it seems that this would be a minimal advantage.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories