lua-users home
lua-l archive

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


On Fri, 2 Aug 2019 at 16:41, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
>
> https://github.com/lua/lua/commit/0d529138042563baf260366e19a7aa2c60a07174

First impressions: I like it!

local function read_file_contents(filename)
   local f <close>, err = io.open(filename)
   if err then
      return nil, err
   end
   return f:read("*a")
end

(I know this email doesn't add much value, but all too often we as
users only ever give negative feeback to open source projects, so it's
good to also give positive feedback every now and then!)

Cheers,

-- Hisham