Slashdot Mirror


Perl 6 In Time For Next Christmas?

An anonymous reader writes Larry Wall has reportedly announced at Fosdem that "Perl 6 Developers will attempt to make a development release of Version 1.0 of Perl 6.0 in time for his 61st Birthday this year and a Version 1.0 release by Christmas 2015." From the article: "There is going to be the inevitable discussions, comments and probably some mileage from detractors to come. However ever were it so, for us in the Perl Community these are quite exciting times. We have two strong languages and a strong community, I think there is a lot that binds us together so here's looking forward to Christmas."

10 of 192 comments (clear)

  1. Perl is more expressive by Okian+Warrior · · Score: 5, Interesting

    Perl's strength is that it's expressive. It's not a language which is easy to learn or which generates heavily optimized code.

    In the demo phase, you're not really worried about performance. The goal is to have something showing as quickly as possible, and not worry too much about how fast it runs, or how much memory it takes. Overspec your demo system for the time being (ie - make it really fast and install lots of memory), and once you have a reasonable interface go back and recode it in a simpler language which can be more easily optimized.

    Languages which are simple to learn (c++, for example) are generally not very expressive. You end up spending tons of time debugging issues of memory allocation, library interface details, and datatype conversion.

    Expressive languages are harder to learn, but any individual line in the expressive language does a lot more. Since you are writing fewer lines, and since the fewer lines do more, you end up making programs more easily and in less time.

    Yes, the programs will execute a little slower, but as mentioned, this is not important in the demo stage. Your productivity will be much higher. And there are lots of places where performance simply doesn't matter. Scripts usually fall into this category.

    Perl was designed by a linguist, not an engineer. As such, it's harder to learn (it's got tons more keywords and context), but once you get the hang of it coding is much more efficient. The following single line:

    @Lines = sort { $a->{Name} cmp $b->{Name} } @Lines;

    unfolds into several lines of C++, plus a subroutine definition with datatype definitions. The following line:

    @Files = <c:/Windows/*.exe>;

    can be implemented using one of over a dozen possible library calls in C++, but is builtin in perl. You don't have to look up the library call interface specific to your system.

    And note that writing unreadable/unmaintainable code is an aspect of the *coder*, not the language. If you disregard perl because "other people use it to write poorly" you are probably one of those people, in which case you should avoid coding altogether.

    1. Re: Perl is more expressive by Anonymous Coward · · Score: 4, Interesting

      std::sort(lines.begin(), lines.end(), [](auto &l, auto &l2) { return l1.name l2.name; });

      Pretty simple in c++14 as well

    2. Re:Perl is more expressive by NoNonAlphaCharsHere · · Score: 4, Funny

      And note that writing unreadable/unmaintainable code is an aspect of the *coder*, not the language.

      That's the funniest thing I've read today. We're talking about a language that has 82 ways to say a = a + 1, 81 of which are completely, gobbletygookly incomprehensible (and look like cartoon swearing) to the average (non-brain damaged) programmer. The FACT is, the language is deliberately designed to reward the cuteseypoo "I (self) graduated from VisualBasic, and I'm WAY cleverer than the rest of you", combined with the "this is a contract job, and I've never ever ever had to maintain somebody else's code" effect, produces the worst, most unreadable, most unmaintainable code on the planet. Get the average Perl programmer, point a .357 magnum at their heads, and ask them to modify something they wrote six months ago, and watch the bloody hilarity ensue.

  2. Re:Enjoy years of splitting between 5 and 6 by fisted · · Score: 4, Informative

    Sorry to break it to you, but perl has use <version>; for a long time now.

    That the Python people went about the version bump in about the most ham-fisted way imaginable does not mean that this would somehow be the case for all languages now.

  3. over a decade of hard work at getting it right by raymorris · · Score: 4, Informative

    From a decade ago until now, the Perl devs have spent those ten years improving upon what you either misunderstood or are exaggerating for comedic effect.

    Java was rushed out quickly, and early versions of Java made that obvious. Perl6 is the opposite - they've taken all the time needed to perfectly implement their vision, to make it exactly what it's supposed to be. Not everything is nail, so a hammer isn't the right tool for every job, but Perl6 is a mighty fine hammer. If you have a task well suited to what Perl6 is made for, it's a fine tool for the job.

  4. Perl lets me do what I want by duckgod · · Score: 4, Insightful

    I look forward to seeing what Perl 6 brings. However, I can't imagine it makes any improvements on the core reason I use Perl5. Perl puts no restrictions on how I program and I am able to get something running by myself faster than any other language.

    I am an adult and when I am programming for my own enjoyment I don't want to be told how I have to program. I definitely don't want to have to worry about squeezing my design into some Object Oriented bullshit. I want to tabulate my code the way I feel best. If I want to enjoy some dynamic variable scoping so be it. Mix up some functional with some procedural go for it. Create some cryptic one liner that I won't understand later, live and learn.

    Bonus points for still serving its original purpose stellarly. Give me some text and I will mold it to how I want. This is what a majority of commercial software does anyways.

  5. Re:Enjoy years of splitting between 5 and 6 by skids · · Score: 4, Interesting

    Also I'll be enjoying (really, not sarcastically) years of using Perl5 and Perl6 in the same file due to the easy integration between the two, replacing that part of Perl5 that was ugly at my leisure, or not, and still having things work.

    I really like this language a lot.

  6. Re:There's more than 1 way to do it? by dbIII · · Score: 5, Insightful

    Help out with grading student programming projects and you'll see that anything can be a write-only language.

  7. Re:Enjoy years of splitting between 5 and 6 by Marginal+Coward · · Score: 4, Interesting

    ... replacing that part of Perl5 that was ugly at my leisure, or not, and still having things work.

    I actually did that about 15 years ago. I switched to Python, then transliterated all of my Perl code into it.

    BTW, it was remarkable to me at the time that in every case of transliteration, the resulting Python files were smaller in terms of both number of lines and number of bytes. Then I realized that since the two are semantically similar in so many ways, Python's lack of braces was a big advantage in terms of code compactness. To be fair, though, I never was one to pack as much code into a single line of Perl as possible. Which is, of course, why I prefer Python: it was never designed for that sort of thing.

  8. Re:Enjoy years of splitting between 5 and 6 by Marginal+Coward · · Score: 4, Interesting

    I actually find Python 2.6.x to be nearly perfect. The fact that it won't be getting any new features, only bug fixes, is actually one of its very best features for me.

    In contrast, Python 3 has always seemed to me to be Guido indulging himself in whittling down the "Python warts" list. Although Python 3 is objectively better in many ways, the improvements don't seem compelling enough to me to bother to really learn, and porting code to it - even with the help of the automatic conversion tool - likewise doesn't seem worth the trouble. And I still kindda like "print" as a statement.

    I do take some satisfaction, though, in the fact that Python 3 became the sort of technical success that Perl 6 never was, and never will be. To be fair, I think Guido drew some important lessons from the Perl 6 debacle, the most important of which was to make changes around the edges rather than try to totally reinvent the language. See Gall's Law:

    A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a working simple system.

    Then again, there was much less need to reinvent Python.