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."
Re:What is Perl 6? (Score:5, Interesting)
So is Perl 6 going to bring about a Perl revival, or is it (as I suspect) going to fall flat when faced with Perl 5's quietly entrenched support and PHP's proclaimed grip on new uptakers? TFA mentions the reasons for cutting backwards compatibility (or at least reducing its priority) far too often for me to be optimistic there.
I think Perl 6 will catch on, eventually... but it's going to be more of an alternative language, not an upgrade, to Perl 5 for a long time yet.
No language that I like better (Score:5, Interesting)
Then I met Perl (5.003). What a difference it made! The data structures were built in, and on top of that, it was EASY to nest structures to build complex data types. It was like having a semester of Data Structures immediately made clear.
Then I found myself back with C++ again. First I wrote my own List classes. However I soon realized that STL made available exactly the types of data structures that Perl has. Maps, Lists, Vectors. And since I understood what I was doing in Perl, it was so much easier to catch on with C++.
Perl taught me C++. Who would have thought?
starting from the bottom (Score:1, Interesting)
They add features, which already exists in some other language, only they maybe improve the interface, or add any sort of incremental improvement to it.
My problem I see, they didn't start with a dream, which became a vision, which became a mission, which transalted to goals, and then a solid implementation.
If you are already familiar with strategic management, you will noticed I borrowed some terms, from that field. Strategic management suggest that for an organization to succeed, it must have a clear vision (based on a dream a good cause or whatever), a mission (a more realistic translation of the vision/dream) , and finally goals and objective (implementation detail)
So I ask, what's perl6 vision, I think perl6 started with details, this is why me and many others are not existed about it, sure it will better (maybe), but it won't be new, and probably it won't add much to the technology arena.
Perl 6 is evolving the language into awesome! (Score:3, Interesting)
"(Perl 5 overloaded curly braces in six different ways. If you can list four, you're doing well.)" ! Java has something like 22 levels of precedence. Most people will use the bare minimum of that, lest they tread upon a dragon's tail.
And, one of my favourite points: "Why is the method call operator two characters (one shifted), not a single dot? "
Perl 6 means a simpler, better parser, while keeping all the language strengths. This means it won't be such a bitch to deal with mod_perl's weird gleeps once it's Perl 6. This means smaller process overhead. This means quicker development of web applications that are cool (although I must admit, Ruby on Rails is also pretty neat looking).
The new regex syntax alone is reason to switch!
Re:What is Perl 6? (Score:2, Interesting)
I'm sure if your employer starts needing perl solutions, they'll buy you a book. It's not that hard to pick up if you come from a programming background. I once got tasked to modify a perl script, and was able to learn enough perl to get the job done within an afternoon. Been a fan of it ever since!
Comment removed (Score:3, Interesting)
PDL (Score:5, Interesting)
I had to break down a equation into a sequence of linear equations. So I hacked up some PDL in like 2 hours to do that. Couldn't have been easier, even though I'd never used PDL or its perldl perl shell; I just started typing in the interactive shell until it worked as expected and until I knew what I was doing. Then I needed the results in interger, so I rounded everything down, built a permuter and sorted the permuted results for each individual segment. That took three hours, but only because I kept botching the matrix multiplication. Even with huge datasets, generating hundreds of thousands of linear equations, each spanning dozens of datapoints, permuting the linear equations, sorting them and selecting the optimal, PDL would run it all my slow arse 800mhz crusoe laptop in seconds. Matlab couldnt touch it.
Thats the other really truly thing about PDL; the performance. If someone else would chime in and do it better justice, but my crude understanding is that it generates some kind of extremely optimized machine code on first use and runs whatever equations you've thrown at it like silk from that point on.
Little late and a little off topic, but PDL really is just a masterpiece of perl hackability. The PDL perl shell is truly spectacular; get some symbolic integrators and differential equation solving packages in there and I wouldn't need to break open Mathematica or Matlab ever again. Ok, long way away, pdl is really just about matricies, but it is really really sweet, and its shell is good for anyone who just wants to try something out really quickly in fully interactive perl.
That being said, I really cant wait to see where the perl6 VM is going.
G'night!
Myren
Perl 6 ~= LISP (Score:3, Interesting)
The question is: is Perl becoming a LISP implementation?
Re:Perl 6 is evolving the language into awesome! (Score:2, Interesting)
Re:No language that I like better (Score:4, Interesting)
In C, you do this with functions in a
In C++, you put the data and the functions together in one package and call it a class. Think of a class as a C struct with a bunch of function pointers in it. So instead of calling myfunction(mystruct) you call myclass.myfunction(). Its conceptually the same (in fact, the machine code is almost identical).
By now you should be thinking "damn, that sounds like what I do in C already". It is. Good C programmers did OOP before OOP was a buzzword. languages like C and Java just add some syntactic sugar like inheretance (one of the most abused language features ever, especially in Java) and autoatic constructiors and destructors into the mix.
About 3 years too late (Score:4, Interesting)
I really hope that Perl 6 arrives one day. I'm pretty deep into using Ruby these days having left Perl 5 behind long ago (the part of the article about what's wrong with Perl 5 was really superfluous; maybe it was intended to convince the remainingn Perl folks who are happy with 5 to check out 6), but I'll give Perl 6 a look when it arrives. The grammar support alone looks pretty awesome; it'd be great to have a viable lex/yacc alternative. In the meantime I want to learn some languages that have a bit more immediate promise like Io [iolanguage.com]. It seems that maybe the plans for Perl 6 were just too ambitious. Yes, it's great to start with a clean slate and try to revolutionize, but often it's evolution that wins out.
Some much better... (Score:3, Interesting)
Some thing are just so easy there's no pride in it. Now make something more wich is harder to read then Perl 5 and you've achieved something. It may be better, but is it good?
Re:My short experience with perl... (Score:3, Interesting)
The mind-bending thing of Haskell's list comprehension is mostly that they're evaluated lazily, and can be of infinite length. A famous examples is of course the implementation of the Fibonacci function in Haskell as an infinite list:
fibo = 1 : 1 : zipWith (+) fibo (tail fibo)Python's list comprehensions are rather neat, but they lack those features, so they don't come near Haskell's level of mindbendingness. They're mostly a cool shorthand for writing down lists that would have been ugly with map() and filter(). I wish the dict comprehension [python.org] PEP had made it...
(I'm a Python fan, but nowadays I program Perl for a living and play with the book Practical Common Lisp [gigamonkeys.com] in my spare time... give Lisp a try!)
The real question is: who cares? (Score:1, Interesting)
Then, we have CPAN - the mangled mess of packages which makes fedora's rpm system look well managed.
And the worst bit: the perl zealots who insist of using this language for everything, even when they have to jump through hoops to get it working.
If perl was wiped of the face of the universe tomorrow, I for one would cheer!
Re:No language that I like better (Score:2, Interesting)
It is possible to work around this by using disciplined inheritance or, better still, by not using implementation inheritance at all, and going for interface inheritance instead. You still get polymorphism, and you still get code reuse (you just need to design the system differently), but you don't get the hidden problems, and the resulting system will be far more robust.
By the way, COM actually uses a similar system. It's based purely on the idea of interfaces. Each COM object can implement one or more interfaces, but can not inherit behaviour from another COM object. Internally, you can use implementation inheritance as much as you like, but from the outside there is no inheritance. You can implement the behaviour of one object in another by encapsulating that object and forwarding method calls, which is externally the same as implementation inheritance, but is more flexible (since you can "inherit" from any object that implements a specified interface without problems), and way more robust.
Hmm... That course I did on component-based software engineering back at university made much more of an impact on me than I thought.
Re:No language that I like better (Score:2, Interesting)
I was thinkink like you till I was hired in a company that use real OO technique.
And I learn the beauty of OO and the very nice way to solve problems by using Factory, Prototype, Facade, Visitor Patterns. I can tell you that before I was writing Object but not thinking 'object' and that is very different.
I agree its possible to code in Assembly using OO technique but it is really not natural and can be really tricky to do .
Re:My short experience with perl... (Score:2, Interesting)
print map {"(@$_)"} @$a; #---> (1 2)(3 4)(5)(6 7 8)
instead?
TIMTOWTDI, bitch!
Seriously, though, nested data structures and the deferencing syntax is the single worst part of perl. I'm not surprised it made you break out into hives. Your main problem, though, is that you keep thinking a list is an array. It isn't. Parens build lists, and arrays are primarily built from lists. Also: learn to use google. I ran into this same problem when I was first starting out and took a few hours to nail down some docs and get familiar with it. The syntax is ugly and annoying, but not overly difficult (assuming you already understand references).
Re:Perl 6 is evolving the language into awesome! (Score:3, Interesting)
"+" as an operator sugguests that the order of the items being operated on has no effect on the answer...
eg. 2 + 3 == 3 + 2
but
"two" + "three" != "three" + "two"
Perl6's direction (Score:2, Interesting)
Re:Perl 6 is (Score:3, Interesting)
Not just another virtual machine nobody needs. Perl6 is also a consequent implentation of language development paradigms. Java started some of it with its so called "platform independent" VM. Microsoft jumped on that train with DotNet and its intermediate language for the CRL. Perl6 bundles those ideas together, gets rid of hierarchy constraints inherited from the old OO drafts, and adds complete costumizability to syntax and grammar while trying to keep the number of built-in functions as small as possible.
No other language does make it so easy by now to adapt the language itself to the needs of the special environment. You could for example write a module that forces strict inheritance to all of your objects, or implicitly puts all variables and values into a protected memory range, or dump your current program state onto a disk, everything within the blink of an eye.
Other implementations of introspection, like Java's Reflection API, provide the needed self-awareness of the code and the means for dynamic object handling up to some point, but that point reached, things tend to get rather ugly. Perl5 provided some "dirty hacks" for a part of that, but couldn't cover everything without breaking compatibility and, most of all, performance.
Still Perl6 won't be the sole answer to every question - as allways TMTOWTDI. But it's certainly interesting enough to keep an eye on it.
Perl 6 = COBOL 9x (Score:3, Interesting)
Just one question (Score:3, Interesting)
Some of us have predecessor's code to use and maintain that do the darnedest things, you know. A bit of protection from the madness of others, that's all I'm asking for.
Re:10 Years Overdue (Score:3, Interesting)
The 10 years the OP is referring to is the 10 (now 11, nearing 12) years since the release of Perl 5, without any major updates to the language (other than a sane versioning scheme).