[effects] Mark effect classes as final
AbandonedPublic

Authored by zzag on Jul 1 2019, 5:02 PM.

Details

Reviewers
None
Group Reviewers
KWin
Summary

Effects in effects folder are final so we can mark them accordingly
just for convenience.

Test Plan

Compiles.

Diff Detail

Repository
R108 KWin
Branch
mark-effects-as-final
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 13477
Build 13495: arc lint + arc unit
zzag created this revision.Jul 1 2019, 5:02 PM
Restricted Application added a project: KWin. · View Herald TranscriptJul 1 2019, 5:02 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jul 1 2019, 5:02 PM
zzag added a comment.Jul 9 2019, 11:37 AM

If there are no objections, I'm going to push it.

It's harmless, so I don't exactly object, but I don't really understand what problem you're taking time to solve.

You can't subclass an effect by accident.

zzag added a comment.EditedJul 9 2019, 12:37 PM

You can't subclass an effect by accident.

From technical point of view you're absolutely right, there's no point for it. On the other side marking these classes as final explicitly, improves readability of the code a bit (imho; that's perhaps subjective matter).

In D22193#492785, @zzag wrote:

You can't subclass an effect by accident.

From technical point of view you're absolutely right, there's no point for it. On the other side marking these classes as final explicitly, improves readability of the code a bit (imho; that's perhaps subjective matter).

For readability sometimes code can also be too verbose. It's pretty clear that these effects normally won't get sub classed again. Or in which cases do you think a reader could assume otherwise?

zzag added a comment.Jul 9 2019, 12:48 PM

You can't subclass an effect by accident.

There's an exception to this though - third party binary effects. They can't be final iirc.

zzag abandoned this revision.Jul 9 2019, 1:00 PM

Given that I'm not insisting on this change and it got slight resistance, I'll abandon the patch.