On 12/18/2010 07:06 AM, Jiří Zárevúcky wrote:
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?



Yes, this is one of the neat features of the Go programming language.

--
--
Travis Watkins
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to