[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Syntax Sugar in Lua 5.2
- From: Dušan Majkić <dmajkic@...>
- Date: Tue, 24 Aug 2010 10:07:10 +0200
> Looks like Ruby to me.
I would love to have do() end as synthetic sugar for anonymous
function() end, since do() fits better as function param
Like this:
string.gsub("4+5 = $return 4+5$", "%$(.-)%$", do (s)
return loadstring(s)()
end)
And, insted of xpcall, it would be nice to have some sort of real
exception catching
do
something(bad)
rescue (error)
print error
end
Also, I think that Lua shoud have at least a blueprint of how to work
with directories.
It is confusing and annoying to use 3p C libs for such basic stuff.
os.mkdir() os.rmdir() and os.exists() will do.
Micro embedded system can easily do nothing, or implement surogate
dirs with filenames.
Finally, why there is no os.setenv()?