Slashdot Mirror


Perl Features of the Future - Part 1

Kevin writes "This story highlights some of the features being included in Perl 6. "There will be substantial changes in the move from Perl 5 to Perl 6. We've been hamstrung for a while by the need to maintain backward compatibility all the way back to Perl 1. There are some things we want to remove, because they seemed like good ideas when they were introduced but they're more trouble than [they're worth] now."

5 of 61 comments (clear)

  1. Re:Perl 6 is a mistake by orthogonal · · Score: 2, Insightful

    [snip: long and thoughtful critique of perl and its future.]

    Wow! He managed to make an allusion to "BSD is dying" and a legitimate use of the Goatse man!

    I would have skipped the gratuitous and tasteless slam at Larry Wall's daughter he ended with, though.

  2. Re:Perl 6 is a mistake by duffbeer703 · · Score: 2, Insightful

    I'm afraid you're right about Perl 6... breaking lots of compatability features with no real goal just doesn't strike me as a good idea.

    --
    Conformity is the jailer of freedom and enemy of growth. -JFK
  3. Re:Goodbye "my", hello UTF-8? by Kailden · · Score: 4, Insightful

    I agree.

    I think every computer scientist worth thier pay should realize that language advocacy stinks. Every language has its niche--a reason for why some guy sat back and said, "I need to write a shortcut language to do this" or "wouldn't it be great if I could have a better correlation between the way I think/design and the language I write in" and it evolves from there. Perl was designed as a glue language heavily modeled after awk/sed and other unix tools and the concept of following natural language and "having more than one way to do/say it" so you need to have a good feel for the language pieces as you do when you become a master of english and understand different connotations and methods of stating something.

    That being said, it is unfortunate that because there are large groups of people who either A) get religious about the language they choose or B) choose not to learn other languages to a point of knowing thier true niche we take every language and bloat it out and take it out of its scope. And in turn that makes it that much harder to grasp each new languages niche because you have to sort through a bunch of crap that trys to make every language the universal language.

    Well, it's human nature I guess. Easy to point out as a problem but not easy to fix...but remember that the next time you are about to tell your coworker that they should "write that in _____" instead of answering thier question. Or, be careful when you complain that "____ is bloated or is too hard to understand" because you are just adding fuel to the fire my friend. It is better by far to state why you chose a certain language on a certain project than to be a universal advocate of "_____".

    Advocacy is a clear mark of inexperience.

    --
    I need a TiVo for my car. Pause live traffic now.
  4. Re:Goodbye "my", hello UTF-8? by josephgrossberg · · Score: 3, Insightful

    I meet none of a, b and c. Here's my opinion:

    Python is easier to read than the equivalent Perl code, even if the latter well-indented. Now before you close your mozilla tab, or mark this as "Flamebait", please hear me out.

    Yeah, I agree that bad code is bad code, regardless of the lang.

    But compare these two equivalent statements of good code:

    pythonNumber = 1

    my $perlNumber = 1;

    Do the "$", the "my" and the ";" look necessary, or extraneous and confusing? They are the latter to me.

    What about $_ and @_ ? Those don't seem very sensible. Nor does "<>", the backtick "`" or several other common Perl paradigms such as the fact that it makes a big difference whether you have single quotes or double quotes around a string.

    Yes, I agree that some of Perl's "hard-to-read" reputation is deserved, but not all of it.

    Why do reasonable people think Perl is hard to read? Because it has lots of unneeded, non-alphanumeric characters and there are lots of conventions that don't make sense (e.g. '<>' meaning a line of standard input).

  5. Re:Goodbye "my", hello UTF-8? by Sharkeys-Day · · Score: 2, Insightful

    my $perlNumber = 1;

    "my" makes it a local variable. It's only necessary if you want that.

    "$" is used to denote a scalar variable. Technically, it is extraneous. (It's part of perl's shell heritage.) On the other hand, some programmers intentionally add several extraneous characters to every variable (hungarian notation), so it must be a taste thing.

    ";" is necessary in languages which don't consider whitespace to be significant. Some people consider significant white space to be annoying and/or dangerous.

    What about $_ and @_ ? ... "<>"

    "$_" and "@_" are pronouns. They usually disappear in the same way "self" does. (Actually, in perl6, "self" is spelled "$_".) Perl, imitating natural language, has more pronouns than most computer languages.

    "<>" is an idiom. In natural languages, commonly used idioms tend to get shorter. "<>" is an idiom for "read the next line from the file(s) named on the command line, or from standard input if there are no files on the command line." How much code would it take you to write that in python?

    Perl is refreshingly concise and expressive.