[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Colon notation in object-oriented programming
- From: Petri Häkkinen <petrih3@...>
- Date: Sun, 5 Mar 2017 14:58:50 +0200
On Mar 5, 2017, at 1:32 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> io.open("results.txt","w"):write(table.concat(results,"\n")):close()
>
> Without colon notation, how far can we get?
If there we no implicit self and no ':' sugar this would be written something like this:
local file = io.open("results.txt", "w")
io.write(file, table.concat(results, "\n"))
io.close(file)
Petri