develooper Front page | perl.perl5.porters | Postings from June 2021

Re: Not an OO RFC, take 2

Thread Previous | Thread Next
Paul "LeoNerd" Evans
June 20, 2021 21:59
Re: Not an OO RFC, take 2
Message ID:
On Sun, 20 Jun 2021 15:17:51 +0000
"mah.kitteh via perl5-porters" <> wrote:

> This is one reason things fail around here, the idea that prometheus
> is just going to show up and give us the answer. I've never seen that
> happen here, or anywhere.

FYI, this feature has already been ~90% implemented. It's my
Object::Pad CPAN module:

That has about a 90% overlap with what we propose to put in core.

And sure, it's not in core yet, it's a CPAN module. But that doesn't

Remember when I added try/catch to core? That was a CPAN module
(Syntax::Keyword::Try) for a number of years, experimenting with
syntax, ideas, implementation, all sorts. When I finally decided to
move it into core it took me 3 days.

3 days.

That was all it took *because* that CPAN module already existed. All I
had to do was copy-paste a bunch of code, and reword a few bits and
pieces to make it fit better as a true core feature.

I feel that an object system is a little bigger than exceptional
control-flow, so I would suggest a couple of weeks to migrate that, but
that's all. If you told me, right now, "migrate the Object::Pad system
into core", I reckon I could have that done in two weeks.

So two requests. Firstly: Please lets not get hung up on "but it'll
take years to implement". Yes, a feature of this size does take years
to implement. But luckily I started it back in October 2019, so...
that's nearly two years ago now. I think it's mostly ready.

Secondly: You can already use it - right now - in production if you
like. I have already been using it for most of the new code I write,
along with converting a whole heap of my existing CPAN modules to using
it. Take a look at the reverse-depends list:

Try it yourself. Experiment with it. See how it actually feels in
practice to use it. That sort of thing gives you so much more insight
than just arguing in the abstract about a spec on paper. That's why I
wrote it.

Paul "LeoNerd" Evans      |  |

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About