lua-users home
lua-l archive

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

> Roberto wrote:
> > On the other hand, it is not difficult to add a "with" to the language
> > that works with exceptions. All we have to do is to use the upvalue
> > system. This system already has all that needs to control when a
> > variable goes out of scope.
> Yes, we laymen have known this at least since the non-local return
> discussion in 2005
> (

I do not think you are a laymen. But I am not sure all "laymen" know
this, as several proposals seem concerned with handling exception

> I decided to put my energy into defining requirements and arguing the
> case for improved cleanup support rather than writing yet another
> implementation.

About requirements, what is wrong with Joonas Pihlaja's proposal?

  do with f, g ="src.txt","r"),"dst.txt",w")
     for l in f:lines() do

(Probably with a different syntax...)

-- Roberto