Hard Pass
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
freddo@feddit.nu to Programmer Humor@programming.devEnglish · 2 days ago

OOP at home:

feddit.nu

message-square
80
link
fedilink
322

OOP at home:

feddit.nu

freddo@feddit.nu to Programmer Humor@programming.devEnglish · 2 days ago
message-square
80
link
fedilink
  • Flipper@feddit.org
    link
    fedilink
    arrow-up
    41
    ·
    2 days ago

    Deref is for smart pointers and not for inheritance.

    • Phoenix3875@lemmy.world
      link
      fedilink
      arrow-up
      22
      ·
      2 days ago

      Let me introduce you to this horror story: Deref Polymorphism https://rust-unofficial.github.io/patterns/anti_patterns/deref.html

    • calcopiritus@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      The windows crate is full of Deref. Because the windows API is full of inheritance.

      It may not be what the trait was thought of for, but I’m glad we have it to interface with APIs that have actual inheritance.

    • jenesaisquoi@feddit.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 days ago

      Also sometimes newtypes

Programmer Humor@programming.dev

programmer_humor@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: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 778 users / day
  • 3.83K users / week
  • 8.61K users / month
  • 17.9K users / 6 months
  • 1 local subscriber
  • 29.7K subscribers
  • 1.11K Posts
  • 22.2K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org