[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Defining APIs, best practices.
- From: Coda Highland <chighland@...>
- Date: Mon, 17 Dec 2012 22:45:38 -0800
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
- References:
- Defining APIs, best practices., Jorge
- RE: Defining APIs, best practices., Thijs Schreijer
- Re: Defining APIs, best practices., Jorge
- Re: Defining APIs, best practices., Javier Guerra Giraldez
- Re: Defining APIs, best practices., Coda Highland
- Re: Defining APIs, best practices., Javier Guerra Giraldez
- Re: Defining APIs, best practices., Rena
- Re: Defining APIs, best practices., Andrew Starks
- Re: Defining APIs, best practices., Coda Highland
- Re: Defining APIs, best practices., Jorge Visca
- Re: Defining APIs, best practices., Coda Highland
- Re: Defining APIs, best practices., Dirk Laurie
- Re: Defining APIs, best practices., Coda Highland
- Re: Defining APIs, best practices., steve donovan
- Re: Defining APIs, best practices., Coda Highland
- Re: Defining APIs, best practices., steve donovan
- Re: Defining APIs, best practices., Coda Highland
- Re: Defining APIs, best practices., steve donovan