• 3 Posts
  • 1.77K Comments
Joined 8 months ago
cake
Cake day: January 3rd, 2024

help-circle







  • MajorHavoc@programming.devtoComic Strips@lemmy.worldMarvel [Tyler Hendrix]
    link
    fedilink
    arrow-up
    9
    arrow-down
    8
    ·
    edit-2
    19 hours ago

    This is great.

    That’s the joke/point in many comics and comic book movies, too.

    Subversive ideas can’t always be communicated openly in children’s media.

    I think the world is a better place for having difficult disruptive ideas voiced in children’s movies, even when they’re only allowed to come out of the mouth of the bad guys.












  • Well said.

    Here I am trying to wind people up and you’re responding with thoughtful nuanced consideration.

    You make some great points.

    I’ll add - for folks reading along - I do think a class is still almost always an anti-pattern, even with all the OOP class function and factory pattern stuff removed.

    I also feel (as you referenced):

    • Functions being forced to reside inside objects is just stupid.
    • Factory patterns are horrible, because they mix config into program code, maximizing uncertainty when debugging

    And also:

    • Inheritance is almost always a worse idea than an interface.
    • classes tend to have additional fancy tooling to make it easier to carry state data around - which is usually a bad idea

    State data is a necessary evil in most programs.

    I’ve found that most advanced class object implementations treat program state data more like a pet than a threat.

    Sorry for the long response - I know you don’t need it - you know what kind of tool you’re looking for.

    I figure they extra detail above might provide food for thought for folks reading along who are surprised there’s even contrasting opinions on classes.

    (And I feel a little bad for not really posting anything very useful earlier in the thread.)