Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] [OT] C# question -- try / catch / finally



On Thu, 21 Nov 2013 16:53:48 +0000, Godwin Stewart <gstewart@example.com> wrote:

> Way off-topic, ...
> ... C# and the .NET ...

Don't worry. I'll bring it back to be on-topic. :-)

> Not my choice, but hey, you do what's asked of you if
> you want to keep your job, right?

It _is_ your choice (albeit perhaps uncomfortable) to affirm 
the antecedent, or to _not_ affirm the antecedent. 

> ... it's this curious "finally" block that has me stumped. I can
> see how it works but I really can't see the point in it.

Perhaps the point is small. 

> If the finally block is executed in both cases, whether the exception is
> thrown or not, what is the point in having a special construct for it at
> all? 

Dunno. Perhaps syntactic shugah for making finishing actions 
more explicit. Python has similar try/except/else/finally statements. 
Check out the with/as context manager in Python. 
https://duckduckgo.com/html/?q=python%20with%20as%20context%20manager



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links