You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So despite the fact that in Mouse there is no real performance gain by declaring class as immutable (in Moose the speedup is 10x) ending Mouse packages with __PACKAGE__->meta->make_immutable became recommenced in documentation as a neat way to kill 2 birds with 1 stone.
This changes in Perl 5.38, which no longer needs true value at the end of package. I'm thinking about mass-removing hundreds of those make_immutable lines from my codebase running exclusively on 5.38 to reduce code noise. Is this reasonable approach if I do not need classes to be explicitly immutable? Does mutability has any performance penalty in some edge case scenarios or any other side effects that justifies making every class immutable as documentation suggests?
So this is not issue about Mouse itself, I'm just wondering if what documentation suggests is still valid advice.
The text was updated successfully, but these errors were encountered:
I have a feeling that two things became bonded:
So despite the fact that in Mouse there is no real performance gain by declaring class as immutable (in Moose the speedup is 10x) ending Mouse packages with
__PACKAGE__->meta->make_immutable
became recommenced in documentation as a neat way to kill 2 birds with 1 stone.This changes in Perl 5.38, which no longer needs true value at the end of package. I'm thinking about mass-removing hundreds of those
make_immutable
lines from my codebase running exclusively on 5.38 to reduce code noise. Is this reasonable approach if I do not need classes to be explicitly immutable? Does mutability has any performance penalty in some edge case scenarios or any other side effects that justifies making every class immutable as documentation suggests?So this is not issue about Mouse itself, I'm just wondering if what documentation suggests is still valid advice.
The text was updated successfully, but these errors were encountered: