‹ BackHN Continuity

Thread

Why isn't mutable a subtype of immutable, or vice versa?

28 points · 56 comments · ibobev

  1. zkmon · · focus · HN ↗
    The fact that it requires so much explanation, indicates the level of degradation in the reasoning ability of the audience. A value of a subtype shall deliver all of the expectations of its super type, because it is wearing both the hats of super type and sub type.
    1. Shorel · · focus · HN ↗
      Not all all. It merely indicates that this is an strict logic approach to the topic.

      <a href="https:&#x2F;&#x2F;commonplacefacts.com&#x2F;2022&#x2F;07&#x2F;27&#x2F;principia-mathematica-300-page-proof-one-plus-one-equals-two&#x2F;" rel="nofollow">https:&#x2F;&#x2F;commonplacefacts.com&#x2F;2022&#x2F;07&#x2F;27&#x2F;principia-mathematic...

      1. applfanboysbgon · · focus · HN ↗
        What part of GP&#x27;s one-sentence explanation is not strictly logical? Does obfuscating a simple logical concept by describing it in academia-wanky-terms like Liskov&#x27;s Substitution Principle make it More Logical? Or does it just make the author and their in-crowd feel more intelligent?

        Note, also, that the article isn&#x27;t even objective. It asserts that the definition of a subtype is Liskov&#x27;s principle. However, Liskov&#x27;s principle is only one of multiple possible definitions. In other words, the article is really only invoking Liskov&#x27;s name as an appeal to authority. So much for strict logic.

        1. pestatije · · focus · HN ↗
          intelligence is overrated
      2. zkmon · · focus · HN ↗
        If the article is written for human consumption, then it fails the primary goal (or logic?) of being useful. If a human has to digest a flood of this logic slop just to get convinced about this simple concept, they are not going to be able to do anything useful.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.