Mr Postman's Lemmy
  • Communities
  • Create Post
  • 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
71
link
fedilink
288

OOP at home:

feddit.nu

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

    Deref is for smart pointers and not for inheritance.

    • Phoenix3875@lemmy.world
      link
      fedilink
      arrow-up
      21
      ·
      1 day 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
      ·
      1 day 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.

  • 867 users / day
  • 4.02K users / week
  • 6.13K users / month
  • 6.2K users / 6 months
  • 1 local subscriber
  • 29.7K subscribers
  • 236 Posts
  • 2.13K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.15
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org