[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Colon notation in object-oriented programming
- From: Peter Aronoff <telemachus@...>
- Date: Sun, 5 Mar 2017 10:26:26 -0500
Dirk Laurie <firstname.lastname@example.org> wrote:
> Have either of you adherents of `io.write(file, table.concat(results,
> "\n"))`, one of whom claims to "do exactly this now", actually tried
> running that line of code? If not, you have missed the point of that
> example and in fact of my post.
I haven’t tried that exact line. I suppose I have missed the point of that
example and your post (in fact!). Sorry.
My point was simply that I prefer to use procedural style. I never use the
colon in Lua. (In point of fact, if we’re going to be precise, I nearly
never use any of the functions in Lua’s io table “raw”. I have a small
module of wrapper methods that I use for convenience. But the principle
remains the same: I avoid the colon and prefer to pass the filehandle into
Out of curiosity, what was your point?
We have not been faced with the need to satisfy someone else's
requirements, and for this freedom we are grateful.
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System