Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by ChrisMarshallNY

4 days ago

If they use protocols with defaults (traits, interfaces, etc.), then they have inheritance.

What they don’t get with protocols, though, is polymorphism. I think a lot of folks confuse them.

I wrote about an odd bug that I encountered, from protocol defaults: https://littlegreenviper.com/the-curious-case-of-the-protoco...

0 comments

ChrisMarshallNY

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities