Changes between Version 1 and Version 2 of Ticket #39591, comment 7
- Timestamp:
- 01/16/2017 12:41:53 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #39591, comment 7
v1 v2 17 17 Furthermore, you, Ryan, said it yourself: wrapping the check in a function will introduce some (tiny) overhead. So I don't see your reasoning in doing this multiple times, instead of only once, for the ''cost'' of a local variable. 18 18 19 As to the introduction of that function in general. Even if the overhead would be bigger, having a public API (that is not using implementation details!) is a good thing as well. Currently, the only thing one can do is to check the constant. If the ''s otrage'' of the CRON status definition ever were to change (I know, I know: won't happen; but still), all of the code directly working with the constant would have to be adapted.19 As to the introduction of that function in general. Even if the overhead would be bigger, having a public API (that is not using implementation details!) is a good thing as well. Currently, the only thing one can do is to check the constant. If the ''storage'' of the CRON status definition ever were to change (I know, I know: won't happen; but still), all of the code directly working with the constant would have to be adapted. 20 20 If there were a function, which is part of the public API, and thus to be used in favor of checking the constant, one '''could''', some day far far away in the future, change how doing a CRON task is defined. 21 21
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)