JoYo
link
fedilink
English
25M

once i learned about defer it became a hard requirement. cpp kinda gives me that but other c like languages do it better.

Yeah, I wish C++ had function/scope epilogs and labeled loops/breaks, too. Those are the cases where the “never use goto” rule can be broken to make better code than adding all of the code that would be required to handle it the “right” way (setting up early exit flags and if statements after each level of nested loop to check the flag).

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 3 users / day
  • 7 users / week
  • 108 users / month
  • 558 users / 6 months
  • 1 subscriber
  • 898 Posts
  • 3.11K Comments
  • Modlog