Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Perl Programming

What is Perl 6? 343

chromatic writes "Perl.com has a new article entitled What is Perl 6?. It analyzes the changes to the language in light of the good and bad points of Perl 5 and provides new information about the current state of the project: Perl 6 exists, you can write code in it today, and it's more consistent and easier to use than Perl 5."
This discussion has been archived. No new comments can be posted.

What is Perl 6?

Comments Filter:
  • What is Perl 6? (Score:2, Insightful)

    by eldavojohn ( 898314 ) * <eldavojohn@noSpAM.gmail.com> on Tuesday January 17, 2006 @02:36AM (#14488518) Journal
    What is Perl 6?
    Probably a pretty good sign I should get off my ass and spend some time learning the language if I don't want to become obsolete to my employer.

    Yeah, I know I'm late to get on this but ... well ... my personal needs and job have never forced me to use it.
  • by ChrisDolan ( 24101 ) <chris+slashdot.chrisdolan@net> on Tuesday January 17, 2006 @02:49AM (#14488580) Homepage
    What makes Perl strong, in my opinion, is the community's interest in maintaining a large and well-tested library of useful code in CPAN. Without CPAN, it's not clear that Perl would be as alive and healthy as it is today.

    What Perl 6 offers is a rejuvenation of the language. Perl 5 still works great (better than ever due to new efforts to stamp out even the most obscure bugs) but this new revision is attracting some *really* smart people who are bringing interesting new ideas to the language. Audrey Tang and Luke Palmer come to mind right away.

    My greatest hope, however, is not that a revitalized Perl will squash the other dynamic languages (Python, Ruby, PHP, ECMAScript, etc) but will instead bring them into a state of interoperability. I really, really want Parrot to succeed so well that the other languages decide to target it as a backend so I can trivially call Python or C libraries from Perl and vice versa.
  • by tuxmaster ( 851910 ) on Tuesday January 17, 2006 @02:57AM (#14488603) Homepage
    One thing that perl is good for that I hope it continues to be good for in the future in command line scripting.
  • by rsidd ( 6328 ) on Tuesday January 17, 2006 @03:14AM (#14488664)
    Three years ago, I could program in C, but had never used a scripting language (except bash, for very basic stuff). I needed to do some non-trivial manipulation of text files and figured that this was a good time to learn. Since others in the group were using perl, I tried perl.

    I knew what I wanted to do, but needed to learn the language. I struggled with the awful syntax for three days. The breaking point came when I wanted a list of lists and realised that Perl "flattens" nested lists. How do you write nested lists such as [[1,2],[3,4],5,[6,7,8]]? In Python, it's trivial (that's how you'd write it), but in perl, nobody I talked to could give me an answer. It flattens it, unasked, to [1,2,3,4,5,6,7,8] and, try as I might, I can't see the point. (It turns out it's possible to have nested lists, but it's yet another example of perl's horrendous syntax).

    Finally, I decided to give python a try. I spent an hour reading the python tutorial, and in another three hours, I had reimplemented everything I'd done in the last three days in perl, and an hour after that I'd finished the job. Python syntax was, and still is, the cleanest I've ever seen. It's an amazing language. And it changed the way I think about programming: it gave me an appreciation of functional methods (I now use ocaml [inria.fr] a lot) and also changed the way I write C (vastly for the better).

    That was it. No more perl for me.
  • by HermanAB ( 661181 ) on Tuesday January 17, 2006 @03:16AM (#14488666)
    Perl seems to be every Unix hacker's favourite, most hated, language. It fills the huge void between Bash and C.
  • by free space ( 13714 ) on Tuesday January 17, 2006 @03:19AM (#14488673)
    With all respect to the importance of strategic management, it is only one way to achieve success. Many of the great organizations of today didn't have a vision when they started and made it up as they went along.

    Linux began as just for fun, Bill Gates' vision when starting Microsoft was "join the bandwagon as fast as you can before you miss the oppurtunity", and Perl itself started as a replacement for awk.

    IMO, you can go either way- top down or bottom up- as long as you're competent enough to see oppurtunity and smart enough to know good decisions from bad.
  • 10 Years Overdue (Score:4, Insightful)

    by dorpus ( 636554 ) on Tuesday January 17, 2006 @03:19AM (#14488677)
    People in the mid-1990s spoke of "overnight obsolescence", that Perl 6 would replace everything in a few weeks, and that you had better learn a new programming language every month. Over 10 years later, perl 6 is still in beta mode.
  • by Pausanias ( 681077 ) <pausaniasx@ g m a il.com> on Tuesday January 17, 2006 @03:56AM (#14488775)
    I do scientific computing (astronomy). I never met the task that was too cumbersome to write in C, while at the same time too complex to write in awk.

    I keep waiting for a task where it would make sense for me to learn perl... it's never come along.
  • Err? (Score:3, Insightful)

    by LordMyren ( 15499 ) on Tuesday January 17, 2006 @04:05AM (#14488790) Homepage
    Normally you wait until a language is actually released before learning it. Traditionally, you let a couple early adopters build something with it first too. Most smart organizations wait to make sure the langauge actually is somewhat stable before buying into the list of benefits. They wait for books to be released.

    Perl6 is not really here yet. Read the last page. Author doesnt come out and state it directly, but the current best implementation runs on Haskell.

    I dunno, somehow I dont think the take-away was supposed to be "learn this or get fired, parrot is the one vm to rulezor them all!!11," I think it was more "perl6 is still coming and has some really cool new features, as well as being built around a much more solid core." There's mainstream technologies worth reading up on if you feel the heat to stay up to date for your job. Then there's things like Perl6/Parrot; cool technologies to read up on if you're actually fucking interested in computer languages or vm's. Forgive me, I realize you simply werent aware of the status of perl6, but perhaps you should see how many band members are actually on the bandwagon before hoping aboard yourself.

    Myren
  • by killjoe ( 766577 ) on Tuesday January 17, 2006 @04:43AM (#14488907)
    Parrot is multi dispach and supports multiple inheritance. It also does not have a patent sword hanging over it like mono does.
  • Re:What is Perl 6? (Score:4, Insightful)

    by Scarblac ( 122480 ) <slashdot@gerlich.nl> on Tuesday January 17, 2006 @04:47AM (#14488916) Homepage

    But if you need to do a longer project, pick up Programming Perl and read it (from front to end). Without that book, Perl can just be extremely weird, after reading the book it at least makes sense in its own world, no matter how unconnected that world seems to be to the rest of the universe :-)

  • by VGPowerlord ( 621254 ) on Tuesday January 17, 2006 @05:02AM (#14488960)
    QFE: "Perl 5 isn't perfect, though, and some of its flaws are more apparent the closer Perl 6 comes to completion." Bolded for emphasis.

    In other words, the spec still isn't nailed down. I may have only been been loosely following Perl 6's progress, but having seen the concatention operator change from . to ~ to _ during Perl 6's development, I'll wait until the final spec comes out, thanks.

  • by rsidd ( 6328 ) on Tuesday January 17, 2006 @05:07AM (#14488972)
    You put it very well. It's possible that if I had seen this doc to begin with, I'd have stayed with perl. But perhaps I would merely have switched later. This was just the last straw -- I'd already spent three days trying to figure out perl syntax (and meanwhile, one colleague was strongly urging me to try python -- everyone else used perl). And I'd already read ESR's article [linuxjournal.com] on his first exposure to Python, so I had a favourable impression of it.

    Having used python for about 3 years now, I'm yet to find something that I can't easily do in it, that I can in other languages. Except for speed/numbercrunching issues. And then I use ocaml (for new code) or C (for existing code). Even if I liked perl syntax and hated python's whitespace-significance (I don't and I don't), I imagine I'd have migrated to ruby by now.

    Actually, the really cool feature of Python, one that I use all the time now, is "list comprehensions" -- an idea stolen from Haskell, and as far as I know, no other language has it. You can't do anything with it that you couldn't with map() and filter() but it's a much more elegant way of writing things -- just the way mathematicians would with sets.

  • Re:What is Perl 6? (Score:3, Insightful)

    by Colonel Panic ( 15235 ) on Tuesday January 17, 2006 @05:20AM (#14489004)
    Probably a pretty good sign I should get off my ass and spend some time learning the language if I don't want to become obsolete to my employer.

    I suspect your manager (if s/he is a typical manager) hasn't even heard of Perl 6.

    Perl 6 is still vapor at this point. It's probably still a year or two away (and may be perpetually, unfortuneately). Yes, there are cool ideas there and you might want to be familiar with some of the highlevel concepts. But if you really want to study some new languages that will help your employment prospects you'd probably be better off learning Ruby at this point (that Rails [rubyonrails.org] stuff is really taking off). If you want to learn something on the leading edge you might even want to consider learning Io [iolanguage.com] No books for Io as yet, but it seems to be be generating buzz among the early adopters (the sort of folks who were using Ruby five years ago).
  • by Viol8 ( 599362 ) on Tuesday January 17, 2006 @05:43AM (#14489058) Homepage
    I hope you're sitting down since this might come as a shock but ... theres
    more to C++ than the STL! Yes , I know , its amazing isn't it that a language
    thats only been around 20 years and is based on C which has been around for
    over 30 is more complex than this , but, well son , its true. Until you
    understand not just all the cool trendy OO and generic side but also understand
    pointer arithmetic, indirection , word boundary alignment issues and 101 other
    low level topics inherited from C then you DO NOT "know" C++ at all.
  • by Viol8 ( 599362 ) on Tuesday January 17, 2006 @05:49AM (#14489076) Homepage
    "Because concatenation was already a single dot"

    And wasn't that well thought out. Who needs "+" for concat like most
    other scripting languages when you can use a "." instead. Doh.
  • by Eivind ( 15695 ) <eivindorama@gmail.com> on Tuesday January 17, 2006 @06:07AM (#14489117) Homepage
    This is true. And to a perlhead it even makes sense. But it still makes the language a *lot* harder to come to grips with.

    In python, an array consists of "[ what,ever,here ]" and that extends inituitively, *without* needing to read any manual-page to the case where "what" in itself is a array (or anything else).

    It's not inituitive that (1,2,3,4) is the same as ((1,2),(3,4)). That's not reasonable at all. Yes there's an explanation for it. Yes the explanation makes sense, from a certain point of view. The thing is, you first have to *aquire* /precisely/ that point of view. It's not something you'd expect.

  • by Viol8 ( 599362 ) on Tuesday January 17, 2006 @07:09AM (#14489293) Homepage
    "sugguests that the order of the items being operated on has no effect on the answer..."

    And a dot suggests a decimal point. Plus or double bar are used as concat
    almost everywhere else. Using a dot was not very logical. But I guess that
    follows the general philosphy of perl syntax anyway.
  • by plurgid ( 943247 ) on Tuesday January 17, 2006 @08:36AM (#14489515)
    > isn't something you should expect to build a whole program ...

    oh, horse crap on that.

    Over 6 years ago, I built a GUI front end to a workflow system (read: database + some business logic) using perl/Tk. An entire department runs the app on it's unix workstations from an NFS mount, and they've been doing it day-in and day-out for that entire 6 year period. All kinds of people have mangled that thing to hell and back, using it in the most inapropriate of ways, yet it's never been broken.

    Perl is what it is, man. It got it's name in the 90's as a web programming language, and I guess it got typecast. Heh ... I guess that'd be "weak typecasting" in this case ...

    Saying perl is dead because PHP r0x0rz so hard is like saying hammers are dead because of nail guns. Pounding nails ain't the only thing a hammer can do.
  • by Phleg ( 523632 ) <stephen AT touset DOT org> on Tuesday January 17, 2006 @10:30AM (#14490075)

    I'm going to paraphrase your post, and we'll see if you can catch on to what most of the other readers here are probably noticing.

    Perl is great! I didn't understand the concepts being taught to me in my Data Structures class, until I found Perl. Perl actually has things like hashes and lists built in, so I don't have to think about things on that level! That's when I went back to C++. I started trying to rewrite these data structures, but in the end I didn't actually have to! It turns out that these data structures were in the STL all along! I'm going to go back and tell my professor about that; he probably didn't know, or else why would he have made us write the things in the first place?
  • by Lost+Found ( 844289 ) on Tuesday January 17, 2006 @11:19AM (#14490413)
    Whenever I hear people saying things like this I think that they really lack visibility or understanding into the language's design process. Granted, the coming-to-life of Perl 6 hasn't been the quickest miracle we've seen, but I'm a hundred thousand percent positive that its being done in the best possible manner.

    Think about it. Larry Wall accepted numerous RFCs from programmers of all walks, discussing Perl's problems / desires for new features / suggestions for new implementations / ideas how to change the syntax. He commented on each one, indicating whether (1) he agreed with the problem, (2) whether he agreed with the solution, (3) what, if anything, he thought should be done about it.

    In the mean time, a radically new language glue system is introduced - Parrot. Perl had such wild success with XS - granted, Parrot isn't just about making language A talk to language B, but it's certainly an example of natural evolution.

    As for Pugs, it's been fantastic. It's allowed lots of people to write real and working Perl 6 code (including lots of tests) to evaluate all aspects of the Perl 6 design before it goes into production.

    Now, I'm not addressing you directly with this last part; rather, a greater community of Slashdot trolls. If you don't feel like Perl is for you, or if you feel like Perl is no longer for you, fine. Find your way to Ruby, Python, Java or whatever floats your boat.

    But please, it's getting really goddamned irritating to have to sift through the comments of a handful of armchair morons that sit at home, interfacing with something called "comments.pl", eating doritos and talking about how the greater Perl community should just drop everything and go to language X, or repeating a tired meme about how the language is making no progress at all (when all they need to do to see the massive progress is read Audrey Tang's blog or visit pugscode.org). And then, there are some mods that feel it appropriate to mark clueless jabs as "insightful".

    I am thankful of one thing - Perl's momentum. While everyone else is barking about how (name my scripting language) is great this week for doing web pages or some nonsense, there is still a huge community of devoted, bleeding edge language researchers and smart people, chisel in hand, forming Perl 6 from the rocks.

    And while the naysayers are switching languages once a week as they make incremental advantages over eachother -- while they're totally clueless that so many of the 'advancements' in their own languages over the years have been 'borrowed' from or 'inspired' by perl, the aforementioned language scientists are preparing to do once again what Larry Wall did, intentionally or not, when he released Perl on the world - bring about a revolution.
  • by IpalindromeI ( 515070 ) * on Tuesday January 17, 2006 @12:04PM (#14490805) Journal
    PUGS (a Haskell implementation of Perl 6; that's gotta be speedy, eh?)

    I keep seeing statements like this, but I don't understand them. A Haskell implementation of a Perl interpreter is no different than a C implementation, which is what Perl 5 uses. The interpreter has to be written in something. Why not choose a high level language that will allow high productivity?

    My guess is that you, and the others who make these remarks, don't know anything about Haskell and think it is Yet Another Scripting Language. Haskell is a statically-typed language, and can be compiled to machine code. In terms of speed, it's quite competitive when written correctly.
  • by Junks Jerzey ( 54586 ) on Wednesday January 18, 2006 @10:34AM (#14499138)
    Did I say everyone should drop Perl 6? To the contrary, I said I was looking forward to it.

    I think you're in denial of what's gone wrong with the P6 process, regardless of how great a language it may be five years from now. You don't develop a language by soliciting opinions and letting things pile up for years without prototyping anything. You certainly don't throw out everything on every level all at once and start up an independent project to develop a virtual machine for an undefined language. Mr. Tang has done things the right way. He wrote a very simple, very straightforward prototype and has been iterating it ever since. Were it not for him--arguably a random hacker--there STILL wouldn't be any kind of P6 prototype.

    The P6 process should have started with a simple, high-level testbed for Perl ideas.

Math is like love -- a simple idea but it can get complicated. -- R. Drabek

Working...