Comment

Comment by tsss

I don't get the motivation behind this. I assume Swift has subtype polymorphism, so why not do this:

  func allEncompassingShape() -> Shape {
    return SpecialGiantShape()
  }
This function returns some type that may be a subtype of Shape.
parent tsss 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton