C++ is better suited to lower level operations than Go, C++ can have huge control over the environment (allowing it to be run on bare metal with no OS) while Go is limited due to it using a garbage collector
If there was a replacement for C++, the best bet IMO would be Zig
As someone who just picked through the Zig docs (take this with a mountain of salt), Zig has a few things going for it:
spec is simple and closer to C in scope
modern language design, toolchain, and overall ergonomics
Go-like struct & interface system
1st-class C interoperability
Go foists co-routines on you and the runtime, and Rust has the borrow checker. Both of these things deeply impact language design, standard libraries, and the overall developer experience. So Zig might actually be a "more modern C" in many ways which makes it a contender. That said, it's not a 1:1 comparsion since it lacks everything else that C++ does: you'd have to re-envision your software designs as something other than OOP if that's what you're used to.
Before the memory safety craze, Rust was hyped as a functional programming language, meaning it not only has lambdas and monads, but also const by default, which will force you to rethink all your programming decisions. Also no classes, so you do even more rethinking.
Unless you work for the committee or for ISO somehow, then I don't think that really follows. C++ and JavaScript were both used in production for decades before they had standards, and the dissolution of the standards committee wouldn't cause compiler vendors to stop developing compilers.
In scenario A they are instantly vaporized. In scenario B they are brutally sliced into multiple pieces and crushed to death, rather painfully depending on the speed of the trolley.
I assumed that the bomb would only kill 4.5 million people but all 8 billion are acceptable too, unless the teams a and b happen to be in the blast radius which seems unlikely. To me the area was only referencing the location of the bomb not the train.
Am I also in range of the nuclear bomb, or am I safe? Unclear as the image doesn't specify if it is drawn to scale or not. Also which direction are the tracks currently pointing.
81 Comments
kryptonianCodeMonkey@lemmy.world · 226 pts · 1y
Option 3 means that the Javascript standards team dies either way, right? Number 3. No hesitation.
Skullgrid@lemmy.world · 66 pts · 1y
the c++ team is a sacrifice I'm willing to make. can we just shoot Brendan Eich in the head if he's not in there too?
kryptonianCodeMonkey@lemmy.world · 40 pts · 1y
Push him onto the pressure pad. Make it his fault.
RoyaltyInTraining@lemmy.world · 12 pts · 1y
I feel like all C++ does these days is badly and very slowly copy other languages. It wouldn't be a huge loss.
rickyrigatoni@lemm.ee · -22 pts · 1y
C++ is obsolete now that we have Go
KSPAtlas@sopuli.xyz · 15 pts · 1y
C++ is better suited to lower level operations than Go, C++ can have huge control over the environment (allowing it to be run on bare metal with no OS) while Go is limited due to it using a garbage collector
If there was a replacement for C++, the best bet IMO would be Zig
stetech@lemmy.world · 2 pts · 1y
As someone who knows neither of the three: Why Zig over Rust as a Cpp replacement?
dejected_warp_core@lemmy.world · 4 pts · 1y
As someone who just picked through the Zig docs (take this with a mountain of salt), Zig has a few things going for it:
Go foists co-routines on you and the runtime, and Rust has the borrow checker. Both of these things deeply impact language design, standard libraries, and the overall developer experience. So Zig might actually be a "more modern C" in many ways which makes it a contender. That said, it's not a 1:1 comparsion since it lacks everything else that C++ does: you'd have to re-envision your software designs as something other than OOP if that's what you're used to.
ZILtoid1991@lemmy.world · 3 pts · 1y
Rust has its own issues.
Before the memory safety craze, Rust was hyped as a functional programming language, meaning it not only has lambdas and monads, but also const by default, which will force you to rethink all your programming decisions. Also no classes, so you do even more rethinking.
brotundspiele@sh.itjust.works · 2 pts · 1y
I don't just rethink my programming decision but all my life decisions every night. Seem like Rust is the perfect language for me.
lime@feddit.nu · 13 pts · 1y
wat
rickyrigatoni@lemm.ee · 3 pts · 1y
I am currently in the process of completely rewriting the BSD kernel in go.
lime@feddit.nu · 6 pts · 1y
how are you handling the GC? how are you handling things like interrupts?
rickyrigatoni@lemm.ee · 9 pts · 1y
GOd will handle it 🙏
lime@feddit.nu · 0 pts · 1y
oh so you haven't actually done any of it.
ZILtoid1991@lemmy.world · 1 pts · 1y
I prefer the binary format over the text format of WASM.
Kolanaki@yiffit.net · 1 pts · 1y
kryptonianCodeMonkey@lemmy.world · 81 pts · 1y
Javascript Standards Team is such an Oxymoron.
rimjob_rainer@discuss.tchncs.de · 4 pts · 1y
Yeah, didn't know there was a standard committee and can't believe how inept they are.
kattfisk@lemmy.dbzer0.com · 2 pts · 1y
They've done amazing work trying to turn the clusterfuck they started with into a good language
scutiger@lemmy.world · 6 pts · 1y
That "trying" is doing the heavy lifting in that sentence.
kattfisk@lemmy.dbzer0.com · 1 pts · 1y
What are some of the outstanding issues that haven't been addressed? I feel like there are genuinely good ways of doing everything these days
far_university190@feddit.org · 3 pts · 1y
Javascript
rimjob_rainer@discuss.tchncs.de · 60 pts · 1y
Bottom tracks, easy
TheGiantKorean@lemmy.world · 19 pts · 1y
bleistift2@sopuli.xyz · 48 pts · 1y
“You and your entire family” means “All life on Earth”.
That should make the decision somewhat easier.
Zozano@aussie.zone · 11 pts · 1y
By my definition, family is who you treat like family.
Donkter@lemmy.world · 6 pts · 1y
I try to treat everyone I meet like family
trxxruraxvr@lemmy.world · 11 pts · 1y
If you make it "all human live" it starts to look quite attractive again
metaStatic@kbin.earth · 4 pts · 1y
I thought seaweed didn't have a common ancestor
eager_eagle@lemmy.world · 29 pts · 1y
there might be an argument that JavaScript kills more than a nuclear bomb
finley@lemm.ee · 28 pts · 1y
peoplebeproblems@midwest.social · 26 pts · 1y
Ok so this one just isn't fair.
Two possibilities end up with me dead, two end up with millions dead, and one ends up with me being unemployed.
Sorry not sorry Team A and B, sacrifices must be made.
BatmanAoD@programming.dev · 4 pts · 1y
Wait, which one leaves you unemployed?
peoplebeproblems@midwest.social · 10 pts · 1y
The lack of standards path of course.
BatmanAoD@programming.dev · 1 pts · 1y
Unless you work for the committee or for ISO somehow, then I don't think that really follows. C++ and JavaScript were both used in production for decades before they had standards, and the dissolution of the standards committee wouldn't cause compiler vendors to stop developing compilers.
peoplebeproblems@midwest.social · 2 pts · 1y
Ok.
Fair.
zib@lemmy.world · 24 pts · 1y
I'd take my odds with the bottom track.
passiveaggressivesonar@lemmy.world · 20 pts · 1y
Which metropolitan area?
superkret@feddit.org · 16 pts · 1y
Assuming it is in the US, at 4.5 million it can only be San Francisco/Oakland/Berkeley.
underisk@lemmy.ml · 31 pts · 1y
would the bomb also kill javascript and C++ or would I have to keep throwing trolleys at it until I get both silicon valley and the JS/C++ devs?
jol@discuss.tchncs.de · 18 pts · 1y
At that distance it also kills you, so it sounds like a good deal. No regrets.
underisk@lemmy.ml · 7 pts · 1y
win win win
Rivalarrival@lemmy.today · 19 pts · 1y
A Mark VI only has a 18 to 160 kiloton yield.
Can we replace it with a B83?
ICastFist@programming.dev · 19 pts · 1y
I've played enough X-COM to know that 50/50 is actually 100%, I just don't know which way. Better trigger it!!
darkbaron202@lemmy.world · 9 pts · 1y
30%? Let me deliver that shot with crit across the map to your teammate hunkered down behind full cover for you!
samus12345@lemm.ee · 19 pts · 1y
Well, you can take yourself out of the equation because you're not tied down and can just move after flipping the switch.
chooses bottom track
"C'mon...c'mon!"
trolley heads towards committe members
"Dammit!"
runs over and jumps on the nuclear bomb pressure pad
AceFuzzLord@lemm.ee · 14 pts · 1y
I'll take the 50/50 because those are some damn good odds!
houstoneulers@lemmy.world · 3 pts · 1y
those are the best odds i've had in years
-dr. mann
AbsoluteChicagoDog@lemm.ee · 11 pts · 1y
Evotech@lemmy.world · 8 pts · 1y
Am I in the Metropolitan area?
Ashelyn@lemmy.blahaj.zone · 18 pts · 1y
You are on track A and the bomb is within sight. If you get the shit end of the 50/50, everyone in the diagram would be vaporized instantly
stevedice@sh.itjust.works · 16 pts · 1y
So you're saying there's a 100% chance the comitees get vaporized by choosing the bottom track.
Ashelyn@lemmy.blahaj.zone · 7 pts · 1y
Well, no.
In scenario A they are instantly vaporized. In scenario B they are brutally sliced into multiple pieces and crushed to death, rather painfully depending on the speed of the trolley.
stevedice@sh.itjust.works · 8 pts · 1y
You need to study up on your trolleys. That's clearly a Vaporizer Trolleynator 3000.
takenaps@lemmy.world · 2 pts · 1y
Lmao
Whorehoarder@lemmynsfw.com · 8 pts · 1y
Are we in the blast zone of the nuke?
xmunk@sh.itjust.works · 13 pts · 1y
Maybe we could use Javascript to direct a simple robot to set the lever while we remain at a safe distance?
Maybe the real solution to this diagram is to nuke it from orbit.
seang96@spgrn.com · 7 pts · 1y
But the robot has to run windows vista
xmunk@sh.itjust.works · 6 pts · 1y
And have a valid Apple developer account?
DontMakeMoreBabies@lemm.ee · 5 pts · 1y
Fuck the metro I guess.
Ziglin@lemmy.world · 5 pts · 1y
Now how do I get it to drift over everything but teams a and b?
ICastFist@programming.dev · 2 pts · 1y
It'll hit the bomb, so teams a and b will be blasted either way :)
Ziglin@lemmy.world · 1 pts · 1y
I assumed that the bomb would only kill 4.5 million people but all 8 billion are acceptable too, unless the teams a and b happen to be in the blast radius which seems unlikely. To me the area was only referencing the location of the bomb not the train.
Nublets@lemmy.world · 5 pts · 1y
Middle track. Then I have plenty of time to hotwire the nuke with my handy dandy mallet
zzx@lemmy.world · 5 pts · 1y
I like those odds
dosuser123456@lemmy.sdf.org · 5 pts · 1y
sudo rm train.sh
problem solved 👍
Iceman@lemmy.world · 5 pts · 1y
There is at least one user here in the superposition of being on two tracks at once.
DarkDiamondK@lemmy.world · 3 pts · 1y
I like those odds
ZILtoid1991@lemmy.world · 3 pts · 1y
Quickly move the switch while on track, then hope the paths willl be wide enough to stop the trolley.
Morphit@feddit.uk · 7 pts · 1y
telepresence@discuss.tchncs.de · 3 pts · 1y
why would you wanna kill the programming language commitees.
mariusafa@lemmy.sdf.org · 3 pts · 1y
Let's play coin flip!
CanadaPlus@lemmy.sdf.org · 2 pts · 1y
Wait, what does the middle track do?
Natanael@lemmy.zip · 5 pts · 1y
It's the Republican track
LordGimp@lemm.ee · 4 pts · 1y
Same as normal but you chose the status quo rather than having it enforced upon you.
Korhaka@sopuli.xyz · 1 pts · 1y
Am I also in range of the nuclear bomb, or am I safe? Unclear as the image doesn't specify if it is drawn to scale or not. Also which direction are the tracks currently pointing.
sga@lemmings.world · 1 pts · 1y
my family is dying and i dont like it, atleast get me on the tracks with them, would not be able to live with the guilt anyway
Flipper@feddit.org · 16 pts · 1y
Take another look, you're already standing on the top track.
sga@lemmings.world · 3 pts · 1y
well that gives me some soothe
fallowseed@lemmy.world · -1 pts · 1y
deepmind: tr0ll3y m4n r3f3rs t0....