Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by LanX (Saint)
on Sep 02, 2019 at 22:02 UTC ( [id://11105479]=note: print w/replies, xml ) Need Help??


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

But can you tell how many talents never tried to join p5p or didn't try to suggest improvements because Perl 6 was on its way?

Ruby was a shock for me after I realized how close it semantically was to Perl 5.

Top Perl 5 with

  • Smalltalk'ish OOP
  • function signatures
  • better code blocks
  • autoboxing of primitives to wrapper classes
  • basic support for DSL's
And you have basically Ruby, just twice as fast.

Update

And the perception of a dieing language came because such improvements couldn't be forged into a newer version.

PHP 5 came with a standard OO system while Perl is still promoting dozens of competing CPAN frameworks 1 1/2 decades later.

A vision and a roadmap would have helped for sure.

> ECMAScript is the most likely candidate to relegate Perl 5 to permanent maintenance mode

Not only Perl. And TypeScript is gaining even more speed.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

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

Replies are listed 'Best First'.
Re^15: Ovid's take on the renaming of "Perl6"
by hippo (Bishop) on Sep 02, 2019 at 22:15 UTC
    PHP 5 came with a standard OO system while Perl is still promoting dozens of competing CPAN frameworks a decade later.

    Long may it continue to do so. I consider this a strength of Perl, not a weakness.

      The learning curve is too steep.

      I remember reading this one perldoc about oop with cows mewing again and again (can't find it anymore), even bought the book Randall Schwartz published at O'Reilly's with that cows without having a clue after reading it thrice.

      This changed only after reading Damian's book on OO.

      At the same time you've already wrote several modules in Python by reading the docs (and ignoring the builtin problems of missing accessors)

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        I see both sides. I lean toward hippo’s view because I believe messy competition will trump all design except the most ingenious and the first draft is almost never ingenious and when it is… uh, perhaps it’s overly ambitious, *cough 6*, *cough*.

Re^15: Ovid's take on the renaming of "Perl6" (updated)
by Jenda (Abbot) on Sep 09, 2019 at 01:49 UTC

    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?

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

      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 whatever.call. 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.

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

Re^15: Ovid's take on the renaming of "Perl6" (updated)
by 1nickt (Canon) on Sep 09, 2019 at 07:00 UTC

    PHP 5 came with a standard OO system while Perl is still promoting dozens of competing CPAN frameworks 1 1/2 decades later.

    That's just nonsense. First, Perl doesn't promote one, another, or any CPAN OO frameworks. Perl is a language. Second, overwhelmingly most professional Perl programmers I am aware of use Moo, with some sticking to the predecessor Moose. No one I know uses bless, and there is no steep learning curve to

    package MyClass; use Moo; has some_attr => ( is => 'ro' ); sub some_func { uc(shift->some_attr) } # eg 1;
    Maybe you should sit down and spend a couple of hours with one of Gabor's tutorials and gain some relevant skills instead of just yammering about historical meta-questions and adding more and more confusion to the debate through your ill-informed commmentary?


    The way forward always starts with a minimal test.
      > there is no steep learning curve

      Unfortunately, there is. See How Moose made me a bad OO programmer for some examples - I don't agree with everything the presenter says (and you might notice me suggesting a different approach), but the underlying message is true: has means several things at the same time and it's pretty hard to understand it.

      Update: The main problem is that Moo(se) doesn't distinguish between cached constructor arguments and public attributes of the object syntactically.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      Perl doesn't promote one, another, or any CPAN OO frameworks.

      Sorry to crash the party but the first half of perlootut teaches "Object-Oriented Programming in Perl" while simultaneously saying things like "we strongly suggest you don't build your objects from scratch" at least 5 times. The last section "PERL OO SYSTEMS" then "strongly recommends" using Moose or Moo or Class::Accessor or Class::Tiny or "literally dozens of other OO-related modules on CPAN".

      But I never use anything other than bless to roll my own objects... *shrug*

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-24 06:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found