Welcome Guest, Not a member yet? Register   Sign In
Bug: Developers are not following their own standards
#1

[eluser]victorche[/eluser]
Quote from the Codeigniter's userguide:
Quote:Use of || is discouraged as its clarity on some output devices is low (looking like the number 11 for instance). && is preferred over AND but either are acceptable, and a space should always precede and follow !.
A recent commit on GitHub (from ericbarnes, CI developer):
Quote:elseif ( ! $this->cur_page AND $CI->uri->segment($this->uri_segment) != $base_page)
And here is an interesting comment on GitHub by philsturgeon (another CI developer) also...
Quote:Style Guide says it prefers AND over && generally.

The question:
Why you're creating rules and standards, when you're not following them?!?

The result:
It is bad for the community, the followers and the developers itself...
#2

[eluser]Unknown[/eluser]
Coming bit late to this discussion... But I do see a problem with CI and ||, &&, AND and OR.

Style Guide says that it's a matter of style.

But PHP manual says it's a matter of precedence. || and OR are not interchangeable!
#3

[eluser]Narf[/eluser]
Precedence in CodeIgniter's style is resolved by adding parenthesis around conditions, when needed.

Also, these inconsistencies (and many more) have already been corrected in the develop branch on GitHub.




Theme © iAndrew 2016 - Forum software by © MyBB