Only 150 light years away?! Wow, that’s practically next door! Now all we need to do is figure out how to go light speed and even then it’ll take a further 300 years just to know if the colonists got there safely or not!
RedFrank24
- 0 Posts
- 14 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
Programmer Humor@programming.dev•Beautiful But DeadlyEnglish
118·9 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.socialtoHacker News@lemmy.bestiver.se•Repatriate the gold': German economists advise withdrawal from US vaultsEnglish
6·9 days agoI doubt it’s even still there. I wouldn’t put it past Trump to have stolen it years back, but it was all kept hush hush.
RedFrank24@piefed.socialtoHacker News@lemmy.bestiver.se•UK Officials could face US entry ban over Twitter policyEnglish
3·19 days agoDo it. It’s obvious at this point that Twitter is being used as a means of political influence over the UK. Ban it until they comply with the law, and if the US retaliates by blocking British officials, ban Twitter permanently and flag Elon Musk as an enemy and seize his British assets.
Unless it’s like… Sociology, or Psychology. They care what you believe.
Would this not also apply to mushrooms?
RedFrank24@piefed.socialto
Programmer Humor@programming.dev•My code is self-documentingEnglish
582·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.
I wish I could say the same. I didn’t get into programming for the money, I got into it because it was the only thing I was any good at and generally wouldn’t discriminate against me because of my disability.

I’m pretty sure that’s a sidequest in Starfield. The ECS Constant colony ship set off in 2140 to colonise a planet, arriving in 2330 at the planet Paradiso, which had become a luxury resort planet for the rich, because shortly after the ship left, humanity invented the grav drive and every ship just zoomed right past them.