• 0 Posts
  • 25 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle





  • Serinus@lemmy.worldtolinuxmemes@lemmy.worldTitle
    link
    fedilink
    arrow-up
    2
    ·
    3 months ago

    Done! You should see about 4 reports in !linux . Take a peek and see what that looks like from whatever client(s) you normally use. Note that you’re not always obligated to take action on things that are reported. You know where the reports come from and have a good idea of how reliable they are.

    We have a completely optional moderator discord here https://discord.gg/wKg6bhkM if you’re interested.

    Thanks for helping out. If you have questions or need help at any point, let us know. You can PM me, there’s the discord, or there’s the info@lemmy.world email that goes to the instance admins.







  • Okay, here we go. I’m going to spit out some bullshit and home someone corrects me if I’m wrong. I’ve looked for some explanations and this is what I’ve gotten.

    Are you ready?

    The Factory Pattern.

    My understanding is that the purpose is a function to return any of several types of objects, but a specific type, not just an interface or whatever they might all inherit from.

    I think most languages now have something like a “dynamic” keyword to solve this issue by allowing determination of the type only at runtime. (To be used with extreme caution.)

    But most of the time I see the Factory pattern, it’s used unnecessarily and can only return one specific type. Why they would use a Factory pattern here and not just a plain old constructor confounds me.

    Am I off base?