[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Defining APIs, best practices.
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 17 Dec 2012 08:39:19 +0200
2012/12/16 Coda Highland <chighland@gmail.com>:
>
>> I interpret setEnabled() as "set as enabled", while being the same as
>> setEnabled(nil).
>
> Ah, and that's where we differ -- I read "setEnabled(" as "set the
> enabled property to", and thereby get an incomplete sentence if there
> isn't a parameter inside.
>
That's why one should not have hundreds of tiny routines with names
like that. `option{Enabled=true}` is unambiguous, extensible and uses
up only one name. PiL 5.3.
I've never been able to understand why people are willing to swallow
great gulps of pseudo-Java in order to avoid creating one table. Even
a well-respected member of the Lua community, in another thread,
recoiled in horror at the construction `{...}`.
- 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