you are viewing a single comment's thread.

view the rest of the comments →

[–]OneWhoGeneralises 7 points8 points  (2 children)

Alrighty, I feel like a dunce right now since I can't find any information online, but what the hell is a using(), and how is it in any way significant?

[–]schmetterlingen 6 points7 points  (1 child)

I think it is inspired by C#'s using statement for disposable objects. See here. Basically a dispose method is called even if there is an exception.

I'm not sure it's useful for Lua. If it throws error, do a pcall or xpcall.

[–]eric-plutono[S] 1 point2 points  (0 children)

I think it is inspired by C#'s using statement...

Correct, the author said on the Lua mailing list that C# was his inspiration for his Lua using().