Re: Colon notation in object-oriented programming
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Colon notation in object-oriented programming
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 5 Mar 2017 18:38:16 +0200
2017年03月05日 16:56 GMT+02:00 Soni L. <fakedme@gmail.com>:
> Have you ever tried:
> ...
> function myfile:write(...)
> local x = #self
...
No ... but I habitually put in my programs
local append = function(tbl,obj,...)
if ... then obj = obj:format(...) end
table.insert(tbl,obj)
end