[Development] Avoid overloading of 'error'
Smith Martin
Martin.Smith at theqtcompany.com
Thu Jun 11 09:29:51 CEST 2015
onError is immediately understood by all sentient beings in the universe.
martin
________________________________________
From: development-bounces+martin.smith=theqtcompany.com at qt-project.org <development-bounces+martin.smith=theqtcompany.com at qt-project.org> on behalf of Christian Kandeler <christian.kandeler at theqtcompany.com>
Sent: Thursday, June 11, 2015 9:21 AM
To: development at qt-project.org
Subject: Re: [Development] Avoid overloading of 'error'
On 06/10/2015 06:42 PM, Thiago Macieira wrote:
> On Wednesday 10 June 2015 15:14:07 Hausmann Simon wrote:
>> Hi,
>>
>> I think renaming the getter to lastError is nice! I however do like error as
>> signal name and it looks good in qml as onError:...
>
> "onError" screams of Basic to me...
> ON ERROR GO SUB foo
> or worse
> ON ERROR RESUME
>
> I don't mind the getter still being named "error" because it's a noun and we
> name our properties (and thus the getters) after nouns.
>
> The problem is the signal: the coding style is that signals are named after
> verbs in the past, indicating that something happened. "error" has no verb in
> the past. Even "errored" would be better, though that's unusual.
>
> I think "error" + verb in the past is best, so here are my suggestions, in no
> particular order:
>
> errorHappened
> errorCaught
> errorEncountered
> errorOccurred (people will get the double r wrong)
> https://en.wiktionary.org/wiki/occured
> errorFound
> errorDetected
> errorDiscovered
> errorNoticed
> errorSeen
> errorObserved
>
> alternatively, with the verb in the active:
>
> caughtError
> foundError
> detectedError
> discoveredError
> noticedError
> sawError
> observedError
>
> If I break out the thesaurus, then we also have
>
> errorBefell
I would +2 this one immediately, even if it's the last thing I do before
losing my approver rights.
Christian
_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
More information about the Development
mailing list