Slashdot Mirror


Damian Conway On Perl 6 and the Philosophy of Programming

M-Saunders writes: Perl 6 has been in development since 2000. So why, 14 years later, hasn't it been released yet? Linux Voice caught up with Damian Conway, one of the architects of Perl 6, to find out what's happening. "Perl 6 has all of the same features [as Perl 5] but with the rough edges knocked off of them", he says. Conway also talks about the UK's Year of Code project, and how to get more people interested in programming.

29 of 132 comments (clear)

  1. Re:But by Waffle+Iron · · Score: 2, Funny

    Will it run on HURD?

    That will have to wait.

    The HURD developers have just noticed that their code would be more elegant if it were implemented using the new features of a modern programming language, so they're now starting a ground up rewrite of the HURD kernel in Perl 6.

  2. Re:"The real problem..." he explained by jez9999 · · Score: 5, Insightful

    No. The real problem is that it is not backwards-compatible with Perl 5, making its rate of adoption guaranteed to be almost zero.

  3. Re: by Anonymous Coward · · Score: 5, Insightful

    See also: Python 3

  4. Now I know why it took so long by NoNonAlphaCharsHere · · Score: 3, Informative

    When you knock the "rough edges" off of Perl, there's nothing left.

  5. Re:"The real problem..." he explained by xorsyst · · Score: 2

    Precisely. How long have we had Python 3.x now? And almost everyone is still using 2.x

    --
    Get free bitcoins: http://freebitco.in
  6. Re:"The real problem..." he explained by NoNonAlphaCharsHere · · Score: 2

    In other words, even they couldn't maintain a large codebase written in Perl.

  7. Re:Fourteen years? by broknstrngz · · Score: 3, Funny

    Growing beards.

  8. syntax by gbjbaanb · · Score: 4, Insightful

    Now, the problem with that is that it only works if you know the distinction in the syntax. So people coming into Perl get lost in this sea of ampersands and stars and all sorts of other symbols that we use in the language. And until you get past and it sort of goes into your hind brain and it just translates immediately, âah yes, thatâ(TM)s a scalar variableâ(TM), âah yes, thatâ(TM)s a type blah, blah, blahâ(TM), it doesnâ(TM)t make sense. It looks like line noise, and I fully agree.

    and he's quite right, because the alternative is COBOL or Visual Basic where every syntax element is spelled out in big words.

    There's a reason Windows developers like C# and not VB.NET (even though its the same thing) and that's the syntax. With C# you get to use a few symbols for various bits that are otherwise spelled out in VB. Perl just takes it to the limit - which means you have to understand what those symbols mean, and if you don't it looks like garbage. Which, I guess, C# looks like to my mum.

    So in other words: learn your shit guys, you can't criticise perl for looking like crap unless you have taken the time to learn the language. And then you'll think it looks correct.

    1. Re:syntax by rubycodez · · Score: 3, Insightful

      wrong, the alternative is not a COBOL or VB like syntax, talk about fallacy of asserting the consequent.

      plenty of well designed languages don't have the sigil mess, it's a sign of scatter-brainedness and design by urban sprawl

    2. Re:syntax by gbjbaanb · · Score: 2

      rubbish. Each element of a language is something you write down. It can be a symbol or it can be a word (or in Java it can be aReallyLongSetOfDescriptiveWords.In.Namespaces)

      The point is that once you've learned the sigils, its no longer a mess, its perfectly understandable and concise. There's no scatter-brainedness there or urban sprawl of design.

      Think of it this way - if you took any language and converted it to a set of machine-readable numbers, they'd all look the same. The difference is that you want something humans can understand. Perl manages this - _but_ you have to take the time to learn what those symbols mean. In more wordy languages, you get the understanding from the English names they use instead. The trouble with that is that many people read the English words and assume they fully know what they mean, when they don't necessarily do.

      We've all seen people who'll use a list when an array would be more appropriate. Even though the code works, they haven't learned the difference between the collection classes and so pick the wrong one. In perl you can't accidentally make that mistake because there is no 'array' or 'list' there's just 2 squiggles.
      Learn the squiggles, you learn which one to use, your code becomes correct.

    3. Re:syntax by sylvandb · · Score: 2

      rubbish. ...if you took any language and converted it to a set of machine-readable numbers, they'd all look the same. The difference is that you want something humans can understand. Perl manages this - _but_ you have to take the time to learn what those symbols mean. In more wordy languages, you get the understanding from the English names they use instead. The trouble with that is that many people read the English words and assume they fully know what they mean, when they don't necessarily do.

      Rubbish is a great word.

      Your squiggles idea has been thought, tested and practically failed decades ago.

      APL much?

      Learn the squiggles

      sdb

    4. Re:syntax by Bill_the_Engineer · · Score: 3, Insightful

      Everything you just said is easily explained by:

      I refuse to learn it properly.

      --
      These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
    5. Re:syntax by Will.Woodhull · · Score: 3, Interesting

      Some languages are simply easier to make mistakes in, thanks to insane syntax.

      This is true. But it is not a weakness of the language. And do not confuse "insane syntax" with what Perl is doing.

      Perl holds the author responsible for using the correct syntax in the context of the author's intent. It does not hold the author's hand, as if they were some kindergartner just starting out. One of Perl's axioms is that the author must be allowed to do whatever he wants without regard to some imposed notion of what is reasonable, for who but the author can know what his intention is?

      That means a lot of shitty scripts are written in Perl. But a lot of shitty verbiage is written in English. Neither language should be judged by the great volume of shitty work that has been done in it. Each language should be judged by the quality of the most elegant work that it can support. There has been some really elegant work done in Perl.

      For critical work, Perl should not be used by programmers who do not yet know what they are doing. While it is a great language for studying things like Knuth's work on algorithms (TAOCP), it should not be used in mission critical applications until the student has mastered those studies.

      And determining which programmers are sufficiently capable to be allowed to use Perl is a problem for the IT managers and software team leaders. It is not a problem with the language.

      Don't try to use Perl in anything that is mission critical until you no longer need the training wheels.

      --
      Will
    6. Re:syntax by Blakey+Rat · · Score: 2

      Human brains are finite. The simpler* a language is, the more likely the developer can fit the entire thing in his head and still have room for the actual problem he's trying to solve.

      If your programming language is unusable without weeks of rote-memorization, it's a bad language. That's not to say C# or VB.Net are better languages than Perl; just that your argument to the contrary doesn't make sense.

      The best, ideal, language would have near-zero cognitive load, so none of the programmer's memory is consumed for the quirks of the language and all of it is available for the problem being solved.

      *) Simpler being defined as, "easier to fit in your head", which is completely circular definition but you get what I'm getting at I hope. I think nobody would argue that JavaScript is simpler than Perl, for example.

    7. Re:syntax by Blakey+Rat · · Score: 3

      This is true. But it is not a weakness of the language

      Yes it is. Programming languages are designed for human beings to use. If it's difficult for human beings to use them, that is 100% a weakness of the programming language.

      I don't know what you think programming languages are for if not humans.

    8. Re:syntax by gbjbaanb · · Score: 2

      TBH I'd rather have a small language that is a lot of small, well defined building blocks and make what I need out of it (maybe I played with lego too much as a kid), than a language that has the kitchen sink in it somewhere - or worse, has 3 kitchen sinks in it because they kept on adding them in different versions. (yes .NET, you)

      So I'd say perl or C are better languages than C# because they are small. Once you know the basics, you can do anything in them. With C# I'm forever finding new things I didn't know it could do or things it does if only I had the newer version.

      With a small language, you can build self-contained libraries that fulfil your need for expansion of new features as they are invented, and replace them if needed.

      I think this is the best, a language should be like an kernel, not a full OS with minesweeper, notepad and media player just because they could be added to it.

      So I think I agree with you :-)

    9. Re:syntax by module0000 · · Score: 2

      The mass of programming languages are designed for the mediocre mass of programmers. The others make the top tier of cash, and don't find Perl "too hard!" at all.

      --
      Trackball users will be first against the wall.
    10. Re:syntax by module0000 · · Score: 2

      I notice you don't even tell us what the squiggles are ...

      There is a man page for that, do your own homework if you are capable of comprehending the textbook.

      --
      Trackball users will be first against the wall.
  9. Re: "The real problem..." he explained by CRCulver · · Score: 5, Informative

    Wrong been using python3.x for ~12months. some people don't like change and prefer to whine - meanwhile in the real world people like me get on with it - Quietly.

    I'm not a professional developer, but I do meet a lot of Python devs, and I always ask them which version of Python their shop is developing for. The answer so far has always been Python 2, often Python 2.5 or Python 2.6.

    Recently I wanted to write up a new application for something since existing ones don't fit my particular needs, and do it in Python 3 since I prefer its Unicode handling, but virtually all the libraries I could think to use were still Python 2 only, and a look at the mailing lists showed that these libraries' developers were positively hostile to Python 3 ("if you want to start a Python 3 fork, fine, but you'll get zero recognition or help from me").

    Anecdotal? Sure. But still enough to get one down.

  10. Re: by RoccamOccam · · Score: 4, Insightful

    or even Python 2.6 and Python 2.7, they're different langauges.

    Hyperbole, much? I don't think that I've had to change any of my thousands and thousands of lines of code to accommodate the move from 2.6 to 2.7 (if I did, it was so minor that I can't remember doing it). Adding features does not make them different languages.

  11. even more rough edges by rubycodez · · Score: 4, Funny

    Larry went crazy, incorporating everything and the kitchen sink into Perl 6 and continues even now.

    Imagine a swiss army knife with fold-out basketball, urinal, blender, spark plug gap tester, hog nose tag plier, etc.

    what a farce, HURD may be still be floundering after a longer time but Perl 6 has gone in more directions

    1. Re:even more rough edges by tnk1 · · Score: 2

      I honestly fear it may already be too late for perl6.

      Let's just look at this like any other software development project. Perl 6 may well be heads and tails above Perl 5, or even other languages, but it has seriously lost momentum to other languages.

      It is good to have a roadmap, and good to change, but they should have settled on like the top 5 features that they really wanted, come up with a solution for it, and released it. At this point, they're just in a cycle of taking so long that the innovation curve is out pacing their development curve and they keep holding back.

      Perhaps they became oversensitive to the criticism that perl wasn't cutting edge enough and so tried to chase some line of purity that would shut everyone up forever, but it has turned it into a death march. Personally, just a few improvements like ditching the sigils and some performance enchancements would have been worth a major version upgrade to me.

      Perl is still relevant only because of the code that already exists in it, and the people who know it. The longer they take to end the uncertainty of perl6, the more people will become comfortable with other languages which are new or have moved on, and the less code there will be in perl, relative to other projects.

      I like perl and I have been waiting for Perl 6 to take off, but at this point, I don't know what I would do with it other than piss off people who are using ruby or python or something else to so sysadmin/DevOps work. If I have to learn to be as good at ruby or python as I am with perl, I'm not going to bother with perl any more.

  12. Re: "The real problem..." he explained by Anonymous Coward · · Score: 4, Informative

    The statistics do not support your observation. Of the major powerhouse python projects, over 80% have python 3x support. Here is a site that tracks the top 200 python packages.

  13. Re: "The real problem..." he explained by CRCulver · · Score: 4, Informative

    My observation consisted of two parts which you have erroneously conflated. When it comes to professional devs, shops may nonetheless continue to work with Python 2 even if major libs are ported to Python 3, because Python 2 is what they are used to and those major libs will continue to support Python 2 for years to come.

    The second paragraph represented only my experience as a casual Python user. Yes, big-name libraries have been converted, but there are still loads of smaller apps and libraries that appeal to hobbyists that are Python 2-only and will remain so until someone outright forks them away from their current, Python 3-hostile administrators.

  14. Re:"The real problem..." he explained by jbolden · · Score: 2

    Werl first off Perl6 has a Perl5 mode so it is backwards compatible. But even if that weren't the case Perl may have lost a lot of momentum but I don't see any reason that non backward compatible languages can't thrive. For example neither JavaScript nor ActionScript was backwards compatible with their parent language (ECMAScript) and both languages did rather well. Java was not backwards compatible with Oak. Perl itself was not backwards compatible with awk/sed scripting. Etc... There are a lot of cool ideas in Perl6. If they can get a hearing they might be successful. They just lost a tremendous amount of time.
     

  15. A story about Damian... by rjh · · Score: 4, Interesting

    At OSCON 2006 I was sitting in one of the green rooms (the spaces set aside for speakers before presentations). My laptop was open and I was happily hacking away on a project. As I killed a bug and checked the code back in, I muttered under my breath, "Python, I love you. You make the hard stuff so easy."

    I noticed a few seconds later the room had gone utterly silent. I looked up, and sitting at the table across from me was Damian Conway, tapping away on his own laptop doing his own thing. I blinked a couple of times and suddenly noticed the entire room was expecting a Perl-vs-Python argument to erupt.

    Damian looked up from his work, noticed everyone was looking nervous. He looked over at me, I gave a "I don't know what's up with them, uh, help?" look and a shrug.

    Damian then looked back at the crowd and grinned. "Listen, the only thing I love more than Perl is well-written software, even if it's written in Python." He looked back over to me. "Kill a bug, didja?" I nodded. He gave me a smile and a thumbs-up, then returned to his code. I returned to mine, and after a few seconds the room let out his breath.

    I love Python. But the only thing I love more than Python is well-written software, even if it's written in Perl. :)

  16. Re: "The real problem..." he explained by radtea · · Score: 5, Interesting

    Fragmentation and stagnation, despite some assurances to the contrary

    I use Python both professionally and for fun (and C and C++ professionally) and don't get this impression at all. Major upgrades to shipped languages take time. The willingness to impose one-time incompatible changes for the sake of long-term improvements takes guts, and can certainly go wrong, but can very well be worth it.

    As someone who worked in C and C++ pre-standardization, I recall (perhaps erroneously) that the new standards broke a fair bit of existing code, albeit in minor ways. And of course Microsoft's broken C++ compiler in Visual Studio 6 resulted in a vast amount of borken code when they finally caught up to the rest of the world.

    That said, I haven't moved to Python 3 yet, although I believe all the libraries I really care about have now migrated. I tend toward late-adoption, though, and my sense of the Python community is that everyone accepts we are eventually going to move to 3. Big changes take years, so it's no surprise that lots of developers are still on 2.x. The real watershed will be when a few major libs (wxPython, say) drops 2.x support.

    In contrast, my impression of Perl 6 is that it's the language of the future, and always will be. It appears so different from Perl 5 that it's a little weird the same name is being used, and it has mostly resulted in sucking the oxygen out of Perl 5 development.

    --
    Blasphemy is a human right. Blasphemophobia kills.
  17. Perl for learning OO by SpaghettiPattern · · Score: 2

    Conway states Perl isn't the ideal fist language and I sort of agree. I OTOH have found Perl awkwardly useful for learning OO. As in Perl 5 you had to roll your own inheritance, you definitely understood it better as a consequence. I transitioned to Java SE and I actually prefer the strong typing as it makes messing up that little harder. Perl is still in my toolbox and I do advanced system programs with it. You know, stuff that both Bourne and Java are bad at.

    --

    I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
  18. Re: by Smallpond · · Score: 2

    Fortran is very good about backwards compatibility...can still compile and run Fortran-77 programs in the newest incarnations...

    Finding a working card punch is the problem.