[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: wiki sections for micro-patches?
- From: Miles Bader <miles@...>
- Date: Sat, 18 Feb 2012 11:47:48 +0900
Sven Olsen <sven2718@gmail.com> writes:
> specification you want to require of people. The implicit "self" created
> by ":" declarations always struck me as a minimally useful piece of sugar
> though -- why make self implicit in the parameter list, only to force
> people to type it every time they reference a member variable? Swap "_ENV"
> for self though, and suddenly lua can go that extra 10% of the way towards
> supporting a C++ style implicit self.
I don't think the ":"-declarations are really intended to offer
"convenience" (specifying a single extra argument isn't so hard,
obviously) so much as lend a little consistency with the ":"-call
syntax, and add a little reinforcement to the notion that "in Lua,
OO-calls use :" -- something which is arguably necessary, given how
common people get confused by trying to use "." without explicitly
specifying the receiver argument...
-Miles
--
Education, n. That which discloses to the wise and disguises from the foolish
their lack of understanding.