Skip to main content

Unknown parent

@Richard "mtfnpy" Harman exactly
but my brain *really* wants individual objects to have their own subroutines
in reply to silverwizard

that book changed tons of our source code ~20 years ago. 🙂
in reply to Jay Hannah

@Jay Hannah oh - is that because it's good or real bad?

I am trying to write a card game for fun - but in order to do that I wanna put routines on cards, so that means objects. But uh.... blah

in reply to silverwizard

Conway's OO Perl book from 20 years ago was AWESOME at the time, changed our code very much for the far better. :)

Nowadays OO Perl is Moose metacpan.org/dist/Moose/view/l… or one of it's many lighter-weight alternatives (lightweight is unnecessary for your use case).

~Soon-ish OO Perl will probably be Corona, but it's only (partially) in bleeding edge Perl for now, if I understood correctly. Check out @ovid for his many posts about that if you care about bleeding edge Perl stuff.

in reply to Jay Hannah

@ovid Happy to chat you through it if you like: discord.gg/W3hu4e8r2w
in reply to Jay Hannah

@Jay Hannah @Curtis "Ovid" Poe ok yeah, I've used moose a lIttle, not sure what edition my OO Perl book is (again, bought as joke), but I think I saw Moose in it

I am kinda... anti bleeding edge, I like stable and boring.

But thanks!

in reply to silverwizard

@ovid if your OO Perl book has Moose in it that's probably a modern book that's good to go. My OO Perl book was ~20 years ago, looooong before Moose was invented. :)
in reply to Jay Hannah

@ovid Moose was invented in 2006 apparently, and it's been backwards-compatible the entire time as far as I know. So anyone anywhere writing about how to use Moose is probably all still solid and completely usable on latest stable perl (5.38.0), no problems. :)
in reply to silverwizard

@deafferret If you want to take a risk with the new OO syntax, ask me anything. I'm the lead designer 😃 (though I'm fortunate that I had a great design team who helped me avoid some major screwups)
in reply to Curtis "Ovid" Poe (he/him)

@Curtis "Ovid" Poe @Jay Hannah Well I'm great at being a major screwup, so, sure, if I am gonna learn something it might as well be the new thing, I'll do my best to bug report, but uh, I am not doing anything strenuous or complicated, and only when I'm too tired to work on something important, but have time to do something for fun, which is rare.
in reply to silverwizard

@deafferret Be aware that it's still experimental not not complete! `perldoc perlclass` should tell you which features are implemented.

The MVP for the core itself is here: github.com/Ovid/Cor/blob/maste…

You can use the latter to see what will be coming up. @leonerd is doing the implementing, so he might have an idea on the time frame (though I don't think there is one)

in reply to silverwizard

@deafferret

Also, for a more realistic view of what can be done now, check out @perigrin 's Roguelike Game Tutorial using the new syntax. He's up to part 6 now.

chris.prather.org/perl-rogueli…

in reply to Curtis "Ovid" Poe (he/him)

@ovid huh. I thought github used to render POD? Did they stop? Is there a HTML render of this anywhere? github.com/Ovid/Cor/blob/maste…
(This is the landing page for people (like me) who want to learn how to use Cor?)

(Apologies for calling it Corona, that was NEVER the name. Whoops! 🙂)

in reply to Jay Hannah

@deafferret I drank a Corona last night. Perfect for hot weather, so I've no complaints about that mistake :)

Yeah, github not rendering POD there is disappointing, so I created a better version a while ago: gist.github.com/Ovid/4cc649c1e…

in reply to Jay Hannah

@deafferret @ovid Honestly for OO theory from a practical standpoint I think Conway’s Object Oriented Perl still stands up. I was recently thinking about how Corinna finally introduced a fly-weight pattern that I didn’t find exceptionally painful like I did when I first tried it after reading Conway’s book.