Profoundly Nerdy · @profoundlynerdy
95 followers · 453 posts · Server bitbang.social

@mart_brooks @presbyterian Yes, it is. I'm looking forward to the next release with initial support for the new object system, .

#corinna

Last updated 1 year ago

Mark Gardner ‍:sdf: · @mjgardner
697 followers · 4415 posts · Server social.sdf.org

@profoundlynerdy @NexusM The project spearheaded by @ovid was renamed from Cor to and the MVP will be available as the experimental `class` feature in v5.38.

Here is the summary from last week’s first v5.38 release candidate: github.com/Perl/perl5/blob/v5.

Here is the reference on the new syntax: github.com/Perl/perl5/blob/v5.

#corinna #perl

Last updated 1 year ago

Mark Gardner ‍:sdf: · @mjgardner
649 followers · 3898 posts · Server social.sdf.org

@Perl For those who haven’t been following @ovid’s project to bring modern effective to , it’s coming this year with version 5.38’s experimental `class` feature.

Release engineer @rjbs is collecting the release branch in github.com/Perl/perl5/pull/211; you can read the new `class` feature announcement at github.com/rjbs/perl5/blob/rel, check github.com/rjbs/perl5/blob/rel for a full reference, or dive deep into the internals at github.com/rjbs/perl5/blob/rel

#corinna #objectoriented #programming #perl

Last updated 1 year ago

Formula1.it :verified: · @formula1it
182 followers · 1242 posts · Server mastodon.uno
Minor Key . net · @richard
140 followers · 95 posts · Server minorkey.social
Mark Gardner ‍:sdf: · @mjgardner
552 followers · 2874 posts · Server social.sdf.org

@madbob asked, “What if 4, but everything is -style objects?”

5 answered the question differently by introducing references and module extensions that don’t require OOP, with a few additional functions, variables, and conventions to provide an extremely minimal path to objects.

The project brings more effective OOP with less boilerplate and more familiar syntax to Perl core without modules. Ask @ovid if you want to learn more. github.com/Ovid/Cor/wiki

#ruby #perl #smalltalk #oop #corinna

Last updated 2 years ago

Mark Gardner ‍:sdf: · @mjgardner
526 followers · 2535 posts · Server social.sdf.org

@blacklight @fuzzix So—we get there now with a feature guard, and eventually a version bundle.

It’s 100% correct to say “classic (non-) 5 OOP doesn’t look like a language that has had OO since birth (and probably imposes OOP as the only paradigm)” or “it doesn’t look like a language that has learned the past 25 years’ lessons of incorporating OOP into dynamic languages.” But it also misses the point.

#perl #corinna

Last updated 2 years ago

Mark Gardner ‍:sdf: · @mjgardner
526 followers · 2535 posts · Server social.sdf.org

@fuzzix @blacklight But characterizing as more “expressive”? If anything it’s less so—and that’s a good thing. It takes the best ideas from various OO frameworks and gives them a consistent syntax, instead of pressing specially-named Perl subs and hash key arguments into service so that if you squint they look like part of the language.

#corinna #perl

Last updated 2 years ago

Mark Gardner ‍:sdf: · @mjgardner
526 followers · 2535 posts · Server social.sdf.org

@fuzzix ++ for and sub sigs providing familiar syntax for , but IMHO their strengths lie in being incorporated into the core language as a default one-stop shop for their features. You could previously (and can still) achieve a similar functional result via modules from , at the price of performance and having to fight both with other Perl developers who disagree with your choices and folks like @blacklight who think it doesn’t count if it’s not in core using certain syntax.

#corinna #perl #cpan

Last updated 2 years ago

Curtis "Ovid" Poe · @ovid
612 followers · 750 posts · Server fosstodon.org

For those following the project to being modern to the core, the first pass has now been merged. github.com/Perl/perl5/pull/207

#corinna #oop #perl

Last updated 2 years ago

Mark Gardner · @mjgardner
378 followers · 1222 posts · Server social.sdf.org

@randomgeek @deafferret @Perl FYI @leonerd has put together a Feature::Compat::Class module that sets options in Object::Pad with an aim to let older versions use forward-compatible syntax and features today: metacpan.org/pod/Feature::Comp

Similar to how his Feature::Compat::Try enables Perls older than v5.34 with try/catch exception syntax

#perl #corinna

Last updated 2 years ago

Víctor Moral · @VictorMoral
405 followers · 9541 posts · Server mastodon.social
Mark Gardner · @mjgardner
347 followers · 822 posts · Server social.sdf.org

@ChristosArgyrop @slott56 @Perl @adamcrussell I think a release needs true *game* changes to change minds, like `use feature 'class'` (a/k/a , initial PR by @leonerd opened last week: github.com/Perl/perl5/pull/206), plus smaller accepted features with sane defaults: perldoc.perl.org/functions/use

Building and showing off great drives interest and a cycle of others doing likewise. Fashion is a secondary effect.

#perl7 #corinna #perl

Last updated 2 years ago

Curtis "Ovid" Poe · @ovid
533 followers · 445 posts · Server fosstodon.org

I am the lead designer on the project to bring modern OOP to the language.

github.com/Ovid/Cor/blob/maste

I ported two-decade old code to use the new syntax and discovered that the Corinna spec is flawed because I couldn't port it cleanly!

After a couple of hours of writing and rewriting the explanation, I discovered Corinna is not flawed. It was my original OO design that was broken.

Many Perl developers are going to discover they don't actually understand class-based OOP.

#corinna #perl

Last updated 2 years ago

Curtis "Ovid" Poe · @ovid
431 followers · 270 posts · Server fosstodon.org

Because the new system for has a proper meta-object protocol and first-class support for object internals, we could potentially have transactions.

method update(%new_data) {
$self->start_transaction;
try {
$self->_update(%new_data);
$self->commit;
}
catch ($error) {
$self->rollback;
$error->throw;
}
return true;
}

We could rollback object state, not just db state.

I suspect I would get grief for proposing this.

#corinna #oop #perl

Last updated 2 years ago

domm · @domm
124 followers · 61 posts · Server social.linux.pizza

@ovid Would you recommend using Object::Pad now (for new code), and switch to later? Or just wait until Corinna is available in (hopefully the next) ?

#perl #corinna

Last updated 2 years ago

Curtis "Ovid" Poe · @ovid
323 followers · 179 posts · Server fosstodon.org

Haven't touched in a while? Modern Perl might surprise you and I'm super-excited that my proposal has been accepted. Here's a simple 2D point class in the new syntax:

class Point {
field ($x,$y) :param :reader;
method invert() {
($x,$y) = ($y,$x)
}
}

For serious OOP fans: it includes a meta-object protocol. The design team has striven to make Corinna as declarative as possible. Might have a 1st version by Christmas.

See more at github.com/Ovid/Cor

#perl #corinna #oop

Last updated 2 years ago

Pol Roca · @polroc
79 followers · 276 posts · Server mastodon.social

Al
@324cat esmenten el podcast de Corinna Larsen i han traduït "guilt" per "broma"... 🥲
No està malament aprofitar que és la qui treu el tema tabú del rei d' matant el seu germà, i en permet parlar-ne obertament als mitjans, per variar.
Però ai la traducció. Que no es referia a una "broma" sinó al sentiment de culpa... 😅

#corinna #espanya

Last updated 2 years ago

Parliamo di news! · @parliamodinews
16 followers · 87657 posts · Server masthead.social
Parliamo di news! · @parliamodinews
15 followers · 87553 posts · Server masthead.social