1. 54
  1.  

  2. 21

    Honestly, I really hope this goes through for the benefit of both Perl communities. Perl 6 is a really fun and useful language that continues in the path of Larry’s linguistical ideas; I think it’s hampered by the initial confusion with Perl 5 and vice-versa. They’ve diverged too much to share a name anymore, in my opinion.

    1. 9

      The linguistical ideas are what bug me the most about Perl.

      So, some natural languages inflect for number, right? English has singular and plurals.

      Linguistical idea for Perl: inflect every variable with its number, in a sort of non-optional pseudo-Hungarian notation: $ for scalars (singular) and @ for arrays (plural).

      Result: super annoying with @foo has to become $foo[0] because you’ve now indexed an array. This was one of the first things that PHP threw out: all variables are just $, period.

      I think using natural languages as inspiration for programming languages is a very bad idea. Use a few mnemonics, sure, x = y if z else w instead of x = z ? y : w, that’s fine. Natural languages, however, are messy things very far removed from the order, predictability, and consistency that programmers value the most.

      If Perl 6/Camelia requires me to do something like properly decline functions, remember the correct gender of every string literal, or conjugate modules, I’m outta here.

      1. 20

        If Perl 6/Camelia requires me to do something like properly decline functions, remember the correct gender of every string literal, or conjugate modules, I’m outta here.

        No, it’s going to be tonal, like Cantonese.

        1. 8

          Entertainingly, iirc a lot of the grammatical fru-fru that natural languages seem to automatically collect, like numerical inflections or gendered nouns, seems to be there to provide redundancy in a vague and lossy medium. That’s sort of the opposite of what one often wants for programming languages, because programs are easier to design and modify when there’s less redundancy.

          1. 6

            Result: super annoying with @foo has to become $foo[0] because you’ve now indexed an array. This was one of the first things that PHP threw out: all variables are just $, period.

            This is solved in Perl 6. Indexing into arrays take the form @foo[0].

            1. 3

              Expressiveness. Perl5 is amazing when it comes to working with arrays and hashes. @capital_of{'Belize', 'Kyrgyzstan'} = ('Belmopan', 'Bishkek');

              1. 1

                Heh, that’s a nice/horrible example.

                I prefer not being too clever in my coding

                my %capital_of = ( Belize => 'Belmopan', Kyrgyzstan => 'Bishkek' );
                

                The “arrow” => is of course just a comma, because why not: http://www.modernperlbooks.com/mt/2013/04/the-fat-comma-and-clarity.html

                1. 1

                  Oh, wow, thanks for explaining. I wouldn’t have been able to understand what was going on otherwise.

                  “Expressiveness”, ew. If you want expressiveness go write some poetry; we’re doing programming here.

                  1. 2

                    Heh, reading the Wall article linked from the StackOverflow answer you refer to in your other comment:

                    Style not enforced except by peer pressure

                    We do not all have to write like Faulkner, or program like Dijkstra. […] Some language designers hope to enforce style through various typographical means such as forcing (more or less) one statement per line. This is all very well for poetry, but I don’t think I want to force everyone to write poetry in Perl. Such stylistic limits should be self-imposed, or at most policed by consensus among your buddies.

                    1. 0

                      He and I have different interpretations of poetry, I guess. I’m thinking more of free verse, perhaps?

              2. 2

                Linguistical idea for Perl: inflect every variable with its number, in a sort of non-optional pseudo-Hungarian notation: $ for scalars (singular) and @ for arrays (plural).

                You’re confused about what’s going on. @ means I want a list. $ means I want a scalar. $f[0] means I get a scalar. @f[0] means I get a list of one element. Why is this important? Because I can say @f[0,1] to get the first two elements, or @f[0,-1] to get the first and the last.

                I think using natural languages as inspiration for programming languages is a very bad idea. Use a few mnemonics, sure, x = y if z else w instead of x = z ? y : w, that’s fine. Natural languages, however, are messy things very far removed from the order, predictability, and consistency that programmers value the most.

                There are millions of perl programmers, so you’re saying millions of programmers don’t value “order, predictability, and consistency” – how can you possibly have it both ways?

                Lacking experience in perl you have no ability to make a statement as to how effective it is, unless you’re willing to stand up YourFavouriteLanguage against every perl programmer out there. Who has that kind of hubris?

                If Perl 6/Camelia requires me to do something like properly decline functions, remember the correct gender of every string literal, or conjugate modules, I’m outta here.

                Now this is just getting absurd. You’re better than this.

                I’m ashamed of the crustaceans that agree with you.

                1. 6

                  I’m ashamed of the crustaceans that agree with you.

                  Bashing on Perl has been a popular pastime since at least Perl 4. Just ignore the haters and keep on hacking.

                  1. 1

                    People actually believe set of things they don’t understand is equivalent (or neigh-equivalent) to the set of things they won’t benefit to understand. But to be proud of your ignorance is one thing, to bash on someone who has less of it (in an area) is something I’ll never find funny.

                    1. 1

                      It’s not entirely clear to me what you’re stating here.

                      I’m saying that @JordiGH has stated they don’t like Perl, and think people who like Perl are… misguided. The upvotes may be from other users who agree, or just think the comment is well-written.

                      I like and use Perl(5), but I’m under no illusions concerning the language’s warts, nor some of the user base’s proclivities for “smart” solutions.

                      1. 2

                        I think you can like Perl, but please don’t like it because of its “linguistical ideas”. Linguistics is a terrible place to get ideas for how to build a programming language, unless you’re willing to go whole hog and implement some kind of smart parser that tries to parse absolutely everything like Wolfram Alpha did and you’re basically doing NLP, not programming anymore.

                        1. 1

                          I like and use Perl(5),

                          I don’t. I haven’t used Perl in a decade, but before that I used it off and on for two decades, and I think the “linguistical ideas” are definitely, without a doubt, the best part.

                          To that end, I’ll make the claim that someone who doesn’t like them almost certainly doesn’t understand them.

                          Variables are not “inflected” with its cardinality, this is just wrong as I’ve demonstrated. “Declining functions?” “Gendered string literals?” What nonsense! Surely this is meant to be a joke, but it’s not funny.

                          First, this is not even remotely close to what Wall is describing when he talks about perl’s learnings from linguists, and so maybe at best it is a cheap joke, but at worse it fosters this incredibly pervasive negative attitude about things we don’t understand. Maybe you’re not sensitive to this, but where I work pretty far in the outskirts of software, the idea that there is anything not worth learning is preposterous at the start, and the claim that something millions of people know is not worth learning is incredulous. This doesn’t make us better programmers.

                          I appreciate people might like the (elitist) joke, just like some people like racist and sexist jokes, but our capacity to know is limited by our communities acceptance of the journey we undertake to get that knowledge.

                          Ha ha. Sigils are dumb. Right up there with global warming. Seriously. This sort of shit doesn’t make me happy on a Friday.

                          1. 1

                            Sigils are dumb, other languages get fine without them, there’s a reason no other language has acquired them, and, going by other comments here, even Perl 6 got rid of the most annoying part of array indexing.

                            If you want to distinguish array slices from scalars from arrays, there is better syntax (e.g. array, element_of_an_array[0], single_element_slice_of_array[0..1]) that doesn’t require inflecting every variable with the same kind of redundancy we put up with in natural languages, nor having to be thinking about evaluation contexts (because natural language requires so much context you see!) or all the other cognitive load of Perl 5.

                            And this is just one example of “linguistical ideas” resulting in annoying things; I could go on, but I don’t want to anger you further.

                            Edit: This looks like a good article on the pros and cons of sigils:

                            https://www.perl.com/article/on-sigils/

                            1. 2

                              Sigils are dumb

                              Fine. Accepted. Sigils are dumb.

                              there’s a reason no other language has acquired them

                              Except rust and swift (? sigil), postscript (/ sigil), Python (@ and * and ** sigils), and actually quite a few languages. What makes this use of single characters “better” than Perl’s use of them? Why don’t we typically call those things sigils even though they’re required to appear next to every use (in that context) of the noun?

                              Look, the real issue here is you don’t like the way perl looks and you’re looking to invent a reason why. That’s what people do when they think learning things is going to be a waste of their time – it takes a long time to learn something properly, so if you can sum up easily the reasons why perl is a waste of your time, and tell a joke at the same time, then you post it online and get other laughs and high-fives from other people just like you. Ha ha, yay internet points.

                              But here’s the thing: Perl won. There are literally millions of perl programmers that value “order, predictability, and consistency” so perl cannot possibly be designed to mess these things up as you claim. You are definitely, absolutely and completely wrong justifying your “opinion” with this:

                              I think using natural languages as inspiration for programming languages is a very bad idea. Use a few mnemonics, sure, x = y if z else w instead of x = z ? y : w, that’s fine. Natural languages, however, are messy things very far removed from the order, predictability, and consistency that programmers value the most.

                              Natural languages have nothing to do with why you don’t like Perl. You’ve just latched onto this to justify your opinion (for some weird reason; like we need to justify opinions!?), and you’re cheating yourself and others out of what’s good about natural languages (and good about perl in general) with this kind of shit.

                              But wait there’s more: There are things you don’t know that haven’t won. Some of them are really exciting, and they look even more like line noise than Perl does. You’re going to miss out on them because of this attitude, and you’re not going to have such clear-cut evidence that you’re wrong with your justification.

                              You think I’m defending the use of @array or $array[0]? I’m not. However the use of a single character for a powerful (loaded) meaning is important and worth defence, and that’s why looking to linguists to figure out how they can formalise this overloading is important.The other way is Iverson, which is a mathematical (instead of linguistic) approach to notation, and (given your opinions about line noise) you won’t like that either. My opinion of perl is my own, and it’s built on a few decades of its use. I shouldn’t have to justify it to you or anyone else, but someone who is eager to learn something new is going to benefit more from where my opinion comes from (experience) than where yours does (avoidance).

                              One thing I think would help us all if there were a single standard goal behind what makes programming better or worse in one situation instead of another; whether that situation is language, operating system, library, or just feel-good stuff. Until someone shows me something better, mine is this: Software is better if it is more correct (for a wider domain), shorter (in source code bytes), faster (in run time), and is built more quickly. It is difficult to have all four, but this is the test I use when someone tells me some language is better than another: Are (some subset of programs) sorter, faster, easier to write quickly? Different languages “win” for a different subset of programs, and it’s worth considering why they win. I’m really always happy to have that conversation, but I’m really unhappy to argue with you about something which is really just your opinion (i.e. that perl sucks because you don’t like the way it looks).

                              1. 2

                                Perl is pretty damn old, and I suspect part of the use of sigils was to aid parsing.

                                They can be considered a form of Hungarian notation, which was once considered de rigueur, but have now apparently been relegated to the dustbin of history.

                                With Perl 5’s references, you can treat everything as a scalar, (but you have to use the -> infix to access hash keys or array positions. So that removes @ and % at least! ;) I used to work with a guy who used hashrefs for everything.

                                Anyway, thanks for the discussion.

                          2. 1

                            Ugh, stop throwing shade at me. It’s perfectly possible to understand contexts and sigils while simultaneously disliking them. Just because I dislike something doesn’t mean I don’t understand it.

                        2. 0

                          You’re confused about what’s going on

                          I am not. I am paraphrasing Larry Wall who has actually said that these decorators are supposed to mimic singular and plurals.

                          https://stackoverflow.com/a/1092701

                          1. 2

                            Yes. You really are. Wall is explaining how he thinks about it. Unless you can think about these things in that way, this will not make sense. I can try to show you other ways to think about it (to correct your confusion), but your paraphrasing indeed misses the point: @ means plural, not @f. There’s a reason Larry says:

                            “So $ and @ are a little like this and these in English.”

                            and that’s because you’re intended to read these f not the array f.

                            1. -1

                              I am not confused. I know that $foo[0] is a dollar sign because we’re referring to a scalar. I still think it’s stupid and introduces the famous “line noise” into Perl. Not only stupid people dislike Perl, and JAPHs are a Perl-exclusive phenomenon for a reason.

                      2. 3

                        I hope this happens too. It makes the most sense. They are two totally different languages at this point, and there was never going to be the Python 2 -> Python 3 type transition with it.

                        1. 2

                          It seems to work to the advantage of C++, which sneaks in by being confused with C.

                          And to people who think that doesn’t happen: People can’t tell the difference between C and “C” even if you explicitly point it out to them, let alone Java and JAVA, Mac and MAC, and Java and Javascript. The distinction between C and C++ is way too subtle to matter, especially if you’ve ever had a web search query as your Facebook status or most recent Tweet.

                        2. 8

                          Dave Barry did a bit that I think is relevant here.

                          1. 1

                            I enjoyed that, thanks for the link!

                          2. 7

                            As this is lighthearted: Karma, karma, karma, karma, karma Camelia?

                            1. 4

                              While we’re here, let’s revive issue 9

                              Pros:

                              • ddgable.
                              • Funny because..
                              • “Issue 9 from Google Labs” (like plan 9)
                              • It literally is issue 9
                              • Good abbreviation for compiler and filename extension: i9
                              • Guy who already made a go programming language gets the name back
                              1. 4

                                I love how assholy the final comment was that closed the issue. Basically “We dominated you this 11 months with our large marketing budget and nobody knows about you and your stupid language, so we aren’t renaming.” And by love, I mean not love.

                                1. 1

                                  Yeah, it wasn’t nice. :-(

                                  1. 1

                                    Fun fact: “Google Go” isn’t a programming language. (It’s the trimmed down version of the Google app for markets with low bandwidth/tiny phones)

                                    https://play.google.com/store/apps/details?id=com.google.android.apps.searchlite&hl=en

                                  2. 3

                                    That has so much better prosody than “go” too. Only downside is I can’t think how you get a cute animal mascot out of it.

                                    1. 2

                                      I find that amusing that now we have this problem as issue 81. Or issue 9 squared if you will.