Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I don't mean to be a troll or anything like that and I haven't really looked at the how the Perl 6 syntax has evolved over the years.

    So, out of curiosity I decided to take a look at the commit and I was bewildered by code such as:

    %*pads{$*current-block} = {};
    for $ -> $statement {
        self.find-vars($statement, 'statement');

    I mean, I can see the point in Perl 5 sigils. They're not pretty, but they're acceptable and they didn't bother me in these almost 10 years I've been programming in Perl.


    • Thank you for writing your comment. You're fears of being a troll are quite unfounded. You're quite frank, and your intention is clearly not to cause ire but to air your own distress. Let me try to help allay it.

      It's nice to be the one putting some Perl 6 code in the way of a Perl 5 programmer with ten years of experience. I'm not surprised that your first reaction to twigils is one of slight... unease. Perl 6 syntax is different, and not just in minor details.

      Things look like line noise when you don't know

      • I think I understand the motivation behind the twigils. In other programming languages you can't immediately tell if a variable name is a local variable or an object attribute, for instance.

        And while I can't think of a better solution, twigils just don't seem to be the best solution to me. Maybe always requiring the object to be explicit is a better solution (e.g. $self.attribute). But then you'll hit me with a TIMTOWTDI hammer since that probably also works. :)

        I don't agree that "line-noise appearance" com

        • And while I can't think of a better solution, twigils just don't seem to be the best solution to me. Maybe always requiring the object to be explicit is a better solution (e.g. $self.attribute). But then you'll hit me with a TIMTOWTDI hammer since that probably also works. :)

          Sorta, kinda, yes and no. :) Even considering what you say in your self-counterattack, many people will use the twigils anyway. Especially if they're the recommended default. Which they are.

          But these are very specific situations and you can even argue that it's a feature - these constructs should only be used by those who know what they're doing.

          Hm. Twigils as a shibboleth for tricky features. ("You have unlocked the '*' twigil and can now use... contextuals!") Yes, I guess so. But I still maintain that they're not as spooky as you imply, especially not the OO ones. The twigils make them fittingly stand out as "almost, but not quite, ordinary variables".

          Trying t

          • Well, I just looked at the new periodic table and if by "gorgeous" you meant "scary", I agree with you. :)

            If you think about it, I guess this discussion wouldn't even exist if Perl 6 wasn't called Perl 6. This implies it's a successor of Perl 5 and thus, eventually, Perl 5 will be obsoleted by Perl 6.

            Being completely honest, what goes through my mind when I read about Perl 6 these days is something like: "Oh shit, I will need to go through all this madness sometime in the future when Perl 6 is completed".


            • In the interests of mutual understanding, I tried to look at the periodic table (which is here [], by the way), and tried to instill a measure of fear in myself. The closest I got was "huh, that's quite a lot of them, isn't it?".

              I think one of the big dividing points between the Perl languages on the one hand and other programming languages on the other, is that Perl embraces complexity -- often quite fearlessly. Language designers are known to talk about minimalism and orthogonality. Perl, in contrast, seems to take as a starting point that the world, including the programming world, is complex and messy and non-orthogonal and full of redundancy and can be seen in different ways by different people.

              Perl 5 has quite a lot of operators. I haven't counted them, and wouldn't really know where to start if I were to try. I'm sure Perl 6 has more, maybe even twice as many. (Again, by some half-defined measure.) I think I don't think "scary" when I look at the table because most of these operators are familiar to me now, and I see the rationale for them. (Yes, duh.) Also, many of them I don't normally consider operators, either because they're too infrastructural (like the comma or the different dotty method calls) or too abstract (like 'does' or most of the alphabetic list operators) to be real operators.

              With the rest of them, they're either new (which one would expect from a new language or even an upgrade), or they're instances of one Perl 5 operator that has exploded into a couple of Perl 6 operators because Perl 6 often takes a more strict view to keeping different things distinct and relies less on value context than does Perl 5. The shift/and/or/negate operators prefixed by plus or tilde or question mark are an example of this; I briefly give the rationale for why I like this change in blog post [] from a while back. I should add that I don't use those particular operators on a day-to-day basis, because of their quite specific and close-to-the-metal nature. (That's also a dimension not visible in the Table; some operators are uncommon in practice.)

              Much of the complexity is actually hidden and folded in by the presence of the metaoperators. Of course, the mere concept of a metaoperator and the sudden ability to create a fitting operator on the spot (along with the parser technology required to make that work) are, by rights, scary in an objective sense. But it's one of the things that grows on you. And I haven't seen people abuse it either; just because there are metaoperators available, people don't suddenly go crazy and produce unmaintainable code. Rather, it helps turn a for loop here and there into a one-liner.

              I came in at around 2004, and I've seen many of these operators mature and take shape. So I guess I'm biased by having seen the rationale for most changes, from Perl 5 through the Apocalypses and Synopses up until today. I agree with most of them. I still don't quite understand how we ended up with eight flip-flop operators, but I haven't really used them yet, so I'll reserve judgment on that point. Maybe they'll be handy in a perl6 -ne context or something.

              As for the "Perl 6 by dint of being called 'Perl 6' places itself as the ultimate successor of Perl 5" discussion, it's not an issue that only you are facing, but probably the sore point between the Perl 5 and Perl 6 communities. Patrick Michaud addresses the naming thing here []. I address the topic at length in this blog post [] (which goes together with this blog post [] by mst++), and I don't feel I have to add much to what is said there. Relations are, by and large, much better since then, but still not ideal.

              It's possible that freenode's webchat [] still works from behind your firewall. I've known some people to reach #perl6 that way.

              • I've actually read all these these references before posting here. I don't usually actively participate in discussions, though.

                "Scary" was the least offensive adjective I could think of to express my general disapproval of it. "Batshit fucking insane" sounds more like my thoughts. :)

                Anyway, the whole periodic table of operators sounded novel when I first looked at it a few years ago. These days, I just feel like such things could be the last nail in the coffin for Perl in general.

                I'm a bit more optimistic l

                • Ask these people if they have a periodic table of standard libraries. Have you ever tried even skimming the full reference of all the Java classes?

                  Just because the complexity isn’t in the operators doesn’t mean it’s not there anywhere.

                  Of course, these people will immediately respond that they don’t use all of that every day, and what they don’t know they can look up. Which of course is just how it is with the operator table too.

                • I can relate to what you're saying about "Perl Survival Mode" and about Perl 6 getting in the way and creating negative PR for Perl 5 users in the business.

                  I wish I could do more to help counteract such negative effects. None of us can change the past, which does contain its fair share of failed dreams and dead ends for Perl 6. With a bit of luck, we can learn a bit from it, and find ways of working which do produce results, and not just important lessons.

                  From my perspective, Perl 6 is bringing important (i

                • Masak and his homies won't acknowledge it, but having few and well-defined operators is a GOOD thing for a language. Operators are akin to prepositions and should be kept to a minimum, in my very humble opinion. I'm pretty sure chromatic/masak/lwall/etc don't think so, though.
                  • I'm pretty sure chromatic/masak/lwall/etc don't think so, though.

                    Very true, because operators are verbs. Prepositions in programming languages are rare. Perhaps regex modifiers count.

                    As for the larger question, parsimony of primitives leads directly towards dialectization, in the case of Forth-like languages; top-down standardization of APIs, in the case of Java; or oscillating periods of expansion and contraction towards contentious compromises, in the case of CLOS or Scheme. Each has disadvantages.

                    • Again, I'm pretty sure you think that - after all, you guys see no downside in crap like "twigils" :D Oh, Mr. Christopher, what are we going to do with you? How you love writing! So, your name is Chromatic (one word!) sort of like Cher? What's wrong with your real name?
                    • "parsimony of primitives leads directly towards dialectization"

                      You are missing the point entirely. Firstly, minimising the number of operators, especially in perl 6's case, would be positive. Secondly, what you are saying, in plain English (I have my pretentiousness filter on) is "if we have very little primitives, we will get into a mess like lisp" and that's simply false - there are many programming languages in the middle of the spectrum that have not been (as you say) "dialectised" (which, according

                    • Firstly, minimising the number of operators, especially in perl 6's case, would be positive.


                      No, seriously. Why?

                      It's obvious you have a target number in mind. Quantify it. If there are facts, discoverable facts, for the design of an ideal programming language, let's be engineers about it. Be specific. "Too many" is not specific. "Fewer" is not helpful. "I know it when I see it" is opinion, not science. Be bold; back up your assertions.

                      I cheerfully ignore the reductio ad lambda calculus argument

                    • Because the operators are not obvious. Not even for Perl 5 programmers. They should be as obvious as +, or -. I'm not against introducing a couple of operators, if they make sense. In this day and age, the engineering goal of a programming language should be to make multithreading and object plurality as easy as possible. I think it's right to make operators smarter so they can operate on arrays or sole elements, but it seems to have gone to a confusing extreme in perl 6.

                      One small case, just looking at th

                    • One small case, just looking at the periodic table of perl 6 operators. I see a whole bunch of string comparison operators (leg, lt, lg, eq, ge, gt, ne) and a whole bunch of numeric comparison operators (<=>, >, <, etc etc) plus cmp plus eqv. Now, I haven’t had time to look at perl 6 deeply in years, but at first glance, that’s even worse than common lisp’s 5 different notions of equality.

                      You are aware that Perl 5 has almost all of these already, right?

                    • You are aware that Perl 5 has almost all of these already, right?


                    • So, are you not going to post my comments on your blog, Mr. Christopher (aka chromatic)?

                      Since you and your friend Ovid seem to be only interested in what you two have to say to each other, I've started posting my comments in my own blog, [].

                      Granted, I didn't expect such unwarranted censorship. I guess it's only okay to talk about whatever you decide, huh? -- ank

                    • I'd rather discuss the Dick Grune research to which you alluded months ago. Did you ever find it? (I'm not Mr. Grune, nor Mr. Pierce, nor Mr. Carlyle, nor Mr. Romata either. What bizarre assertions.)

                    • No, your name is Shane Warden, and you've published a couple of books as S. Christopher. As for the rest - my Pierce books are laughing at you. I'm sure you want to be them, but it's obvious to everyone you fail (as for Romata, I think you should have said Tomita - he has nice parsers that are porbably the only ones that can parse your perl 6 monstrosity.) Also, I'm tired of you editing my comments, so I am still cross-posting this to my blog []