Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Re: Synopsis 3 is out

by TimToady (Parson)
on Mar 19, 2004 at 19:16 UTC ( #338122=note: print w/replies, xml ) Need Help??

in reply to Re: Synopsis 3 is out
in thread Synopsis 3 is out

You shouldn't try to intuit the rationale for these things from the synopsis. Compatibility with other programming languages is only one of many considerations that go into these decisions. In the case of ?: we felt the Huffman coding of it was too short, and we wanted individual ? and : for other purposes. Be thankful we do think about compatibility with other languages, or we wouldn't have made the new operator resemble the C operator at all. As it is, we get the nice side benefit that ??:: now looks like all the other double-char short-circuit operators. And we can now use the single character versions for more important things.

Replies are listed 'Best First'.
Re: Re: Re: Synopsis 3 is out
by tachyon (Chancellor) on Mar 20, 2004 at 01:50 UTC

    A large market for Perl 6 *is* existing Perl 5 users. The quesion is this. If you have to learn a whole lot of new operators is it easier to learn a new language or to learn perl 6?

    I like javascript as a language limited though that may be. I hate actually working with it because, like many hacks, I have in the past had to make two almost similar languages (JScript and Javascript/Live Script) work. The major problem is that they are just similar enough to trick you.

    Perl 6 will face this hurdle. There is a lot of perl 5 code and there are a lot of perl 5 coders out there. When/if perl 6 arrives there will be concurrent perl5 and perl6 code which is rather similar to the J(ava)script issue. Sure you can say use perl5 in perl6 but this is very similar to saying I will only code JS for IE.

    Are there any examples of languages that have rather radically changed the API in the past? By radical change I mean breaking almost every existing progam more complex then hello world.



      Those are all good questions, and there's no perfect answer for any of them. On the subject of new operators, we try hard to look at how it will fail if people use the wrong operator. For example, in the case of changing "->" to ".", it's almost certain that you'll get a parse error if you accidentally use Perl 5's concatenation operator accidentally. In other cases, such as the case of changing "|" and "&" from bitops to junctional ops, you won't get a syntax error, but we felt that the new ops will be used so often that people will learn them rapidly.

      Another thing going for us is that there will be a Perl 5 to Perl 6 translator, so it'll be pretty easy to learn the correspondences just by feeding your Perl 5 code in and seeing what comes out. Many awk programmers originally learned Perl by feeding their programs through a2p, for instance.

      As for the confusion of switching back and forth, those of us on the Perl 6 design team have been switching back and forth for some time now. Yes, we do make occasional mistakes. And every time we do, we feed that back into the design process, and ask ourselves whether there was a way to prevent that mistake either by making the Perl 6 features fail-soft to the Perl 5 interpretation, or by differentiating the features further so that it's easy to keep them straight in your head.

      But when it comes right down to it, we can't solve all these problems by design. We accept that there will be a certain amount of confusion over the short term. We also accept that a few people will abandon Perl for other languages. But we're not optimizing for the short term here. We're trying our durndest to optimize for the long term.

      There's a very interesting article in the latest SciAm about the people who are "maximizers" vs. the people who are "satisficers". The essence of Perl is that it rewards you regardless of whether you're a maximizer searching for the best way, or a satisficer just looking for some way that's "good enough". This will not change in Perl 6.

      And when it comes down to it, I don't actually care whether another language has tried it in the past, or whether it has succeeded or failed. I only know that my brain has this sweet spot in it where, if I'm happy with Perl 6, a lot of other people are going to be happy with it too. That's all I've got to go on, and sheer determination, and the help of a lot of other people who share that determination.

      I wonder how much you can change perl and have it still be Perl. I've got mixed feeling about Perl6. There's things I'm really looking forward to that are difficult or impossible now, but some of the semantic stuff, well I just don't know. Personally I'd like something to see something like Damian's Perl5+i


      "To be civilized is to deny one's nature."
Re: Re: Re: Synopsis 3 is out
by muba (Priest) on Mar 19, 2004 at 19:32 UTC
    You say 'we'. Does that mean that you're involved with Perl developement?

    Anyhow, what odes Huffman coding mean?
      You say 'we'. Does that mean that you're involved with Perl developement?
      Eh? No, I'm only involved in the design. I delegate the development to competent people.
      Anyhow, what odes Huffman coding mean?
      Huffman coding is a compression algorithm that uses letter frequencies to turn frequent characters into a short number of bits and infrequent characters into a longer number of bits. As a compression algoritm, it's not all that great, but we've generalized the concept to mean any conscious tradeoff between the length of a construct and its frequency of use. It's a very important design criterion for computer languages. It's just another version of "Easy things should be easy, and hard things should be possible." In this case we apply it to the desirable length of tokens in the language. Similar reasoning went into lengthening the bitwise operators for Perl 6, but shortening the junctional ones in their place. We felt that junctional operators were going to be more important than bitwise operators in general, unless you're writing device drivers.

      Apparently you don't know who you're talking to. Just know that TimToady has done enough to help with 'perl development'. LMAO!

        If you'd look at my homenode, you'd see I'm a relative new member of PM :)
        Update: replaced PM (Personal Message) with /msg, which of course applies more to PM (Perl Monks)
        Update 2: uhm... whatever

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://338122]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2017-06-22 23:14 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (531 votes). Check out past polls.