r/programminghumor • • Jan 16 '25

Semantic code

Post image
7.6k Upvotes

130 comments sorted by

View all comments

Show parent comments

4

u/Necessary-Signal-715 Jan 16 '25

The closest keyword to the semantics of nonetheless (as in "regardless of what happened previously") would probably be finally

1

u/ArduennSchwartzman Jan 17 '25

I hear you all. Let's do this.

if condition then do something1
end if
nonetheless do something2
nonetheless do something3
finally do something4

1

u/DrFloyd5 Jan 18 '25

Ah so if something1 throws an exception you expect something2 to execute anyway.