Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^15: Ovid's take on the renaming of "Perl6" (updated)

by Jenda (Abbot)
on Sep 09, 2019 at 01:49 UTC ( #11105849=note: print w/replies, xml ) Need Help??

in reply to Re^14: Ovid's take on the renaming of "Perl6" (updated)
in thread Ovid's take on the renaming of "Perl6"

Better code WHAT? You mean the insanity with Yeyeieieield? A confusing special syntax for methods taking just one lambda (sorry, code block) while the syntax in case you dare to need to pass two is totally different and even more confusing?

1984 was supposed to be a warning,
not a manual!

  • Comment on Re^15: Ovid's take on the renaming of "Perl6" (updated)

Replies are listed 'Best First'.
Re^16: Ovid's take on the renaming of "Perl6" (updated)
by Anonymous Monk on Sep 09, 2019 at 06:43 UTC
    Perl has the prototype (&) for code blocks but only as first argument. The rest of your rant is cryptic for me. - lanx

      Prototypes are best ignored.

      In Ruby, if you only need to pass one function/lambda/block/whatever-you-decide-to-call-it, you do NOT specify the function parameter in the method signature, you just happen to use the misnamed, absolutely illogical statement yield (or whatever concoction of vowels that word contains). There is no indication whatsoever in the signature that a block will be accepted as an unmentioned, unnamed parameter.

      As the parameter has got no name, you can't do something like testing it for null or undef, something that'd be in any way consistent with anything. Nope. You test the value of the block_given? method. How lovely.

      Now if you need to pass two lambdas ... you can throw all this down the drain and start again with a named parameter &whatever, call it with How do you specify the hailed blocks when calling that method I can't remember. What I do remember was that if you copied a block from one place to another, suddenly what used to introduce a new variable, lexical to the block, happily accesses a more global variable, 'cause variable declaration is too uncool and you are supposed to have a gazillion of two line methods anyway.

      Yes, you guess right. I had to use Ruby for some time and I hated every single minute.

      1984 was supposed to be a warning,
      not a manual!

        I think what LanX means when saying "prototypes" are formal subroutine parameters, like what Function::Parameters provides and what maybe becomes part of Perl 5.34, not what Perl currently implements under the name uf "prototypes".

        One of the main selling points of Ruby are Domain Specific Languages.

        Restricting Perl to have a code block prototype (&) only at first position is hindering many options for syntactic sugar.

        Be it more expressive versions of 'map' and 'grep' or 'loop' constructs. Basically because you want to add a modifier between keyword and block, without needing to explicitly introduce ', sub' .

        Your rant about the limits of Ruby may be legit, but had little or nothing to do with what I said or meant.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11105849]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2020-05-26 17:48 GMT
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (150 votes). Check out past polls.