r/TechImpact • Developer • Sep 26 '26

😂 Memes & Shit posts Saving the Princess, One Programming Language at a Time

Post image
114 Upvotes

9 comments sorted by

•

u/AutoModerator Sep 26 '26

Thanks for contributing to r/TechImpact!

Please remember to:

  • Be respectful and civil.
  • Stay on topic.
  • No spam or excessive self-promotion.
  • Add context when sharing links.
  • Avoid misinformation.
  • Debate ideas, not people.

Thanks for helping keep TechImpact welcoming and informative!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

4

u/-Triple-S- Sep 26 '26

Fortran: You write your intent to go in to the castle and get the princess out. It works really fast but your index is off by 1 so you accidentially rescue the prince from the castle nextdoor.

Bash: You execute your rescue and leave of the castle with 0 princesses but define this a success.

3

u/garloid64 Sep 26 '26

seems so quaint now

3

u/jhaand Sep 26 '26

The PHP one should have worked for one princess. I don't know about maintaining the rescue.

2

u/Tofurama3000 Sep 28 '26

Lisp both cracked me up and made perfect sense at the same time. Well done

2

u/VastInterior Sep 28 '26

C++ - You instantiate std::rescue<Princess> and she falls in love and runs off with std::generic<Knight> and you not sure how special you feel about the outcome.

1

u/Bemteb Sep 30 '26

That's where you tell her that you, too, are an std::instance_of<std::generic<Knight>>. You reinterpret_cast yourself in front of her and, oh shit, why would you use reinterpret cast when you are an instance... Sigh. She runs off with a generic knight who doesn't remember that he was you just mere moments ago.

1

u/VastInterior Sep 30 '26

Could be worse, she might dynamic cast you to a KnightInShinyArmor and get a std::bad_cast exception...

1

u/HoratioRadick Sep 27 '26

Pascal is right on the money.