Silver's Home
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@snaggen@programming.dev to Programming@programming.devEnglish • 2 years ago

The Tragic Death of Inheritance

avivcarmi.com

message-square
52
fedilink
  • cross-posted to:
  • rust@programming.dev
102
external-link

The Tragic Death of Inheritance

avivcarmi.com

@snaggen@programming.dev to Programming@programming.devEnglish • 2 years ago
message-square
52
fedilink
  • cross-posted to:
  • rust@programming.dev
This is a story about how I gradually fell in love with composition
  • @mrsgreenpotato@discuss.tchncs.de
    link
    fedilink
    English
    1•2 years ago

    Thanks for the explanation! I haven’t worked with Rust before, would these traits be an equivalent of C# interfaces?

    • @snaggen@programming.devOP
      link
      fedilink
      2•2 years ago

      Traits are similar to an interface, but with some differences. Here is a comparison with Java interfaces https://stackoverflow.com/a/69485860

Programming@programming.dev

!programming@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



  • 63 users / day
  • 555 users / week
  • 3.17K users / month
  • 7.48K users / 6 months
  • 20.6K subscribers
  • 2.19K Posts
  • 33.4K Comments
  • Modlog
  • mods:
  • snowe
  • Ategon
  • @MaungaHikoi@lemmy.nz
  • @UlrikHD@programming.dev
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org