ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
or put another way, if perl6 will not be backwards compatiable with perl5 [0], what can one do to maintain/prepare for the steady migration to perl6 when it actally happens? A /lot/ of servers require perl. I know that 6 ain't ready yet but I'd like to be there and prepared when it is.
The wikipedia article to which you link says that there will be a "compatibility mode", which presumably will allow your cornflakes to remain crispy without breaking, but that makes me nervous.
If you really want to migrate to Perl 6, I suspect it will be a lot of work. For example, the following:
Code:
$array[$index]=5;
will have to be changed to
Code:
@array[$index]=5;
The only hope is that someone, somewhere, will provide code to translate Perl 5 code to Perl 6 code, or at least do most of the work.
Not to be totally snide (but a little snide) but it will probably not matter because (1) Perl 6 will never be released [that was the snide part] and (2) Perl 5 will exist for a long *long* time and more than likely some things will *never* migrate away from it. Also I'm sure there will be some effort at a conversion program, because the language is so difficult it won't work 100% (maybe not even 75%) of the time. Python has a similar converter to the new stuff for easy differences like the fact that print() is a function now but even it doesn't do it right all the time, and the changeset it has to deal with is much smaller.
AFAIK, Larry Wall himself is developing Perl 5 -> Perl 6 translator.
OTOH, Perl 6 is supposed to be able to run Perl 5 code with the corresponding compiler pragma, and if it is so, the only remaining part is interfacing between the two parts, which shouldn't be that much for a sane interface.
Before I even started learning Perl, Perl 6 "was coming ..."
No good rushing things.
If they do make Perl 6 "to see the light of day", it'll be really good.
I reread Perl 6 stuff after familiarizing myself with functional languages concepts and examples (Haskell, OCaml), and Perl 6 and its new compared to Perl 5 features started to make much more sense to me.
For example, lazy evaluation is widely used in functional languages like Haskell and AFAIR there is a lazy evaluation library for OCaml.
Many years ago I decided to learn Perl rather than sh, sed, awk because it made more sense to me to learn one language rather than three.
Today I am even more lazy, so learning Perl 6 instead of OCaml + Haskell would be a good thing. But, the truth is, OCaml is damn efficient in its compiled form - Perl 6 has a long way to go WRT efficiency (because of its bytecode nature at the moment).
OT: For personal interest, you can do lazy evaluation in many languages, though the time to invent it is widely varying. R5RS Scheme has "promises" which are thunks that are memoized:
Lazy algorithms also feature prominently in Chris Okasaki's Purely Functional Data Structures (http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf) which is implemented in Standard ML. Mark Jason Dominus provides some steps towards implementing things like infinite streams in Higher Order Perl.
Perl 6 is already there and I'd say, by the end of this year we'd see a first "real" version.
Parrot had its 1.0 release recently (which is the base of the Rakudo Perl 6 implementation) and several people are really coding like robots on Rakudo.
The "November" wiki is one of the first Perl 6 projects; check out here:
Documentation is sparse right now, but apress has published a Perl 6 handbook and the usual suspects are writing the Perl 6 variants of Learning Perl and the other camels.
What's mostly missing is the Perl 6 version of the 20.000 CPAN modules.
Anyway, I totally love Perl 6 and Parrot - if you're used to Perl, coding is extremely smooth and very compact in Perl 6 and it's much more coherent in a "hm, I think this might work that way oh yes it really does" way.
And no, people who hated Perl 5 because of its line noise won't like Perl 6 much either.
Perl 6 is already there and I'd say, by the end of this year we'd see a first "real" version.
Parrot had its 1.0 release recently (which is the base of the Rakudo Perl 6 implementation) and several people are really coding like robots on Rakudo.
The "November" wiki is one of the first Perl 6 projects; check out here:
Documentation is sparse right now, but apress has published a Perl 6 handbook and the usual suspects are writing the Perl 6 variants of Learning Perl and the other camels.
What's mostly missing is the Perl 6 version of the 20.000 CPAN modules.
Anyway, I totally love Perl 6 and Parrot - if you're used to Perl, coding is extremely smooth and very compact in Perl 6 and it's much more coherent in a "hm, I think this might work that way oh yes it really does" way.
And no, people who hated Perl 5 because of its line noise won't like Perl 6 much either.
Actually, as I see it, other languages often require a lot more to be written to express the same thought. I mean, there is often much more (line, character) noise in other languages.
Larry Wall has always promoted Huffman coding: "the most common characters using shorter strings of bits than are used for less common source symbols". Just he means bytes rather than bits WRT to programming languages, i.e. the most frequently used constructs should use minimum characters.
Sergei, you don't have to convince me - I'm a Perl lover since version 4.something.
Anyway, this was more or less a reference to the common critique of Perl being unreadable - "The Register" dubbed Perl the only programming language capable of writing code "using nothing but punctuation".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.