|
|
Subscribe / Log in / New account

The folio pull-request pushback

The folio pull-request pushback

Posted Sep 23, 2021 8:22 UTC (Thu) by SomeOtherGuy (guest, #151918)
Parent article: The folio pull-request pushback

There's a lot of focus on the name here, this reference is often overused but I think you guys are having a bit of a "bikeshed" moment - the name is the most trivial part of this.

This is quite a common situation, so much so the object-orientated analogy is common (but slightly altered)

We have a Bird class, later Birds gain the ability to fly, our Penguin subclass can't fly - we have to handle that.

At some point the sane action is to create a FlyingBird subclass and stick your flying birds there and leave Penguin under the now-implied-flightless Bird base class, or (which you can do here as structs don't inherit) have a FlightlessBird name we put Penguins under.

You have a third option: both, you now have FlightlessBird and FlyingBird and the implied-property-of-Bird (whichever it was, flightless or not) is now attached to the name.

That's it, those are your options up to name isomorphism - bickering about FlyingBird vs flightful_bird doesn't change what's going on.


to post comments


Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds