The only thing stopping me from moving to Linux is the fact I want to play Battlefield 6 and Space Marine 2.
RedFrank24
- 0 Posts
- 11 Comments
Only if you’re going by the strict UML definition of composition, which doesn’t really apply here, since the industry has moved on a bit since UML was king.
Either way, you can use DI to do composition in the strictest UML way, provided every single dependency is transient and creates a new instance every single time. Even then though, when most devs talk about composition, they aren’t referring to the strict UML definition.
If you’ve used Dependency Injection before, you’ve used the principle of composition over inheritance. So, if you’ve ever used .Net (C#), Spring Boot (Java) or Laravel (PHP), you’ve likely used it. Modern C++ also has the DI pattern.
Rust and Go force you to use composition and don’t support inheritance at all, so if you’ve used either of those languages, you’ve followed the practice, though Go doesn’t support DI out of the box. Functional languages like Haskell also use composition over inheritance.
all of them?
I’m not sure what you mean? Doing composition over inheritance is considered good practice across the board, regardless of whether it’s frontend or backend.
Always favor composition over inheritance if you can.
RedFrank24@piefed.socialto
Technology@lemmy.world•Pope Leo XIV brings not peace but a sword to AI oligarchs and a slop-mad world in new address, says it's 'Turning people into passive consumers of unthought thoughts'English
222·7 days ago“passive consumers of unthought thoughts” is an apt way of putting it. With AI, it’s so easy not to think and have it think for you, even in things that you should really want to think about because it’s entertaining.
For example, I’ve been re-watching Game of Thrones, and I wondered how things would have changed if Joffrey had a father figure in his life that wasn’t Robert, say a teacher in swordsmanship. I could spend a lot of time thinking about how Cersei would see this teacher as a rival and want him dead, whether Robert would protect that teacher because he’s making Joffrey into more of a ‘man’, whether Joffrey being trained as a swordsman would make him braver, and even if everything happened as written up to the Blackwater, would Joffrey find his courage and go out into battle, and ultimately get killed by one of Stannis’ soldiers? What would happen to Sansa?
Or… I could just ask ChatGPT, get a quick answer, and forget all about it.
RedFrank24@piefed.socialto
Programmer Humor@programming.dev•Beautiful But DeadlyEnglish
123·12 days agoAnyone who complains about code not compiling on the first try likely hasn’t been coding for very long. Getting your code to do what you tell it is easy, getting it to do what you want is hard.
RedFrank24@piefed.socialto
Programmer Humor@programming.dev•My code is self-documentingEnglish
612·2 months agoThe only times I’ve seen devs do inline comments in their code is when it’s been done by AI, and I can tell it’s AI because the comments are all useless and describing what’s happening, not why.
RedFrank24@piefed.socialto
Animemes@ani.social•When you find your favorite anime's fandomEnglish
32·2 months agoI would be ashamed of the Dragonball Z fandom, but I can’t speak Spanish so it could all be completely profound for all I know.

I thought EasyAntiCheat didn’t like Linux?