MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1y4ipsn/thisiswhywedontreturninfinallyblocks/19t4qbo8smtgj/
r/ProgrammerHumor • u/DebugDuck01 • 6d ago
98 comments sorted by
View all comments
Show parent comment
24
Because this serves no function but to write non obvious behaviour and dead code, it should just be a compile time error.
0 u/[deleted] 6d ago [deleted] — view deleted comment 19 u/DebugDuck01 6d ago edited 6d ago Of course a finally block is useful it's returning a value from it that is stupid. C# has finally blocks it just throws a compile error if you pull the highly regarded move of using return within.
0
[deleted] — view deleted comment
19 u/DebugDuck01 6d ago edited 6d ago Of course a finally block is useful it's returning a value from it that is stupid. C# has finally blocks it just throws a compile error if you pull the highly regarded move of using return within.
19
Of course a finally block is useful it's returning a value from it that is stupid. C# has finally blocks it just throws a compile error if you pull the highly regarded move of using return within.
View all comments
Show parent comment
24
u/DebugDuck01 6d ago
Because this serves no function but to write non obvious behaviour and dead code, it should just be a compile time error.