My biggest mistake in the design of the new object system for the #Perl core is that I didn't make methods private by default.
Had I proposed it, I think it would have been the right thing to do. Pretty sure there would have been a rebellion against me.

Bill Ricker
in reply to Curtis "Ovid" Poe (he/him) • • •I think private by default would be correct in theory
but
in terms of getting it accepted into core feature class,
that would yes likely have been fatal, or removed as a condition for moving forward,
so ... no harm no foul ?
Bill Ricker
Unknown parent • • •True enough.
But as thoroughly as we collectively ^embraced^ (read: rejected) the data encapsulation of Inside-Out Classes that were in vogue (supposedly) around the debut of PBP, i expect we'd want actual enforcement of _private() methods but not reversion to pre-OO-modularity of " what you forget to export isn't visible interface"; default private with :public attribute would at least make it clear at the useful spot but.
Curtis "Ovid" Poe (he/him)
in reply to Bill Ricker • • •Bill Ricker
in reply to Curtis "Ovid" Poe (he/him) • • •@perigrin yes, affordances matter.
An :attribute to decorate a whole class once, to set default pub/privacy for the class might make it easy to do tight encapsulation when needed and loose or heritable access also easy.
Paul Evans
in reply to Bill Ricker • • •class :struct { ... }
Bill Ricker
in reply to Paul Evans • • •Paul Evans
in reply to Bill Ricker • • •@BRicker @perigrin
Imean,... this literally already exists ;)
metacpan.org/pod/Object::Pad::…
Client Challenge
metacpan.orgBill Ricker
in reply to Paul Evans • • •