Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's a presentation that Larry Wall gave at Google that has a lot to do with the internals of Perl 6: http://www.youtube.com/watch?v=JzIWdJVP-wo Actually, to be honest, I don't recommend it, I found it surprisingly dull in delivery (sorry, Larry), but the contents were very interesting.

I actually think describing Perl 6 as "having macros" is accurate, but gives the wrong impression. It doesn't "have" macros, it's made of macros. The whole language is made of macros and you are nearly begged to extend it with more grammar. Or you can throw theirs away and write your own for something. Or you can throw theirs away, take some of it as a base, and extend it.

It's a wild, wacky experiment that needs to be done. Whatever happens, we'll learn a lot. My intuition says "collapses under its own complexity" (especially after trying to add a few grammar-modifying CPAN modules) is the most likely result, but I fully support with no sarcasm someone trying this out in case my intuition is wrong. It's not just Lisp redux, it's something new.



especially after trying to add a few grammar-modifying CPAN modules

How do modules compose with respect to syntax? I remember encountering a big frustration in Common Lisp when I used two libraries that depended on defining '[' as a reader macro for pretty syntax. Whichever library I allowed to use the '[' reader macro, my usage of the other library became verbose and hard to read.

Not to mention that neither altering a module's source nor depending on the sequence of module loading is scalable across many modules.


they are lexically scoped, so as a non expert, I guess they are closer to scheme than to CL


The whole language is made of macros and you are nearly begged to extend it with more grammar. Or you can throw theirs away and write your own for something. Or you can throw theirs away, take some of it as a base, and extend it.

And people wonder why Perl is known as a "write-only" language!


Because it's a powerful language and during the dot com boom was used by a lot of very poor programmers.

Rails is running into the same problem with overuse/abuse of monkey patching, method_missing etc. that perl ran into with overuse/abuse of rich syntax.

It's sad. But it's really nothing to do with either language. They just handed a large chunk of power to a developer community that grew too large too fast for most of the membership to have learned how to use that power responsibly.


So, do you think the key to Perl 6's success is to avoid that? That is, do you think it's better for Perl 6 to have a smaller, more seasoned developer community in the beginning (to establish some best-practices before the rest of us join in)?


Unless you manage to pull every novice, dabbler, and new developer into the community and teach those best practices from the start, you won't solve the problem on a large scale. Programming -- especially the realm of informal, ad hoc programming so well served by dynamic languages -- rewards individual exploration. You don't have to write elegant Python or Ruby or PHP or Perl to get your job done, and you don't have to learn a lot of theory to accomplish a task. You may make a mess, but it's not clear that novices care about that. Why should they?

Perl 6 has an advantage in that most of the tutorials and examples aren't full of bad examples and muddled thinking like most of the Perl 5 tutorials and examples are. I don't expect that to last, but hopefully some thoughtful language design will make abusing the language much more difficult.


No, the key to Perl 6's success is to convince all of the Perl 5 developers to move on to the new language. Also, if they (the Perl coders) go on a binge and port all the CPAN libraries over to Perl 6, that will help.


To be fair he is talking about the new Perl 6 language. Not the current Perl that everybody uses.


Well quite. Who wants to take over maintenance of a project that's effectively written in the previous developer's personal language?

Perl's not alone here, you can do the same thing with C++ using operator overloading, but Perl actively encourages this to an order of magnitude greater extent.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: