Re: [Vala] Adding defer in vala?



pancake píše v So 18. 12. 2010 v 11:46 +0100:
Go adds a new keywordnamed 'defer' that schedules the execution of a statement until a return is 
perfiormed. Something like.. I have to do x,y,z before leaving..

In vala we have a bit of automagic reference counting which can close filedescriptors or destroy objects 
automatically.

Do you think that it would be good for vala to support 'defer'?

You can do the same using try/catch/finally.
I don't think it brings enough convenience to justify adding a new
keyword. Nevertheless, the idea is somewhat interesting. Does any
language implement it?

Attachment: signature.asc
Description: This is a digitally signed message part



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