lua-users home
lua-l archive

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


On Mon, Dec 17, 2012 at 10:15 PM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> On Mon, Dec 17, 2012 at 6:11 PM, Coda Highland <chighland@gmail.com> wrote:
>> I mentioned this two e-mails ago, and doing that adds additional
>> overhead to the setter (pairs() and a loop) and further worsens the
>> asymmetry between getter and setter.
>
> It depends (once again) whether it happens a million times a second or
> not. This style is useful for constructors as well, things which
> aren't called that often and operate logically as a single operation.
> Consider the common case: setting a property causes an update of the
> object, and might even cause a canvas repaint or some other
> heavyweight action. By grouping the properties together, we can set
> them as a single transaction.

Indeed, there's always the balance between beauty and performance.

>> hail from the Qt community, where we think the C++ community at large
>> is a little crazy and we mostly have an implicit agreement that Qt's
>> API style is pretty much the best you can do in C++.
>
> Used to be a _big_ fan of C++ but insane over-templatization and
> arrogance of the std::community turned me off. Then I discovered
> languages which compiled faster ;)

Hehe, I don't much like STL either, but Qt-based apps compile pretty
fast (by C++ standards), even templated ones.

/s/ Adam