11-07-2007, 12:31 PM
|
#7 (permalink)
|
|
The Reckoner
Join Date: Sep 2007
Posts: 437
Thanks: 22
|
On the subject of "defines", why arn't people using the PHP5 equivalent, that's, const. I see it all the time, people create a Database class (for example) then place the defines that work with it in the global scope, rather than using class to encapsulate this information.
Another advantage of this is that you don't have to be so strict with your const names, i.e.
Member::ACTIVE_FLAG
Job::ACTIVE_FLAG
rather than
MEMBER_ACTIVE_FLAG
JOB_ACTIVE_FLAG
__________________
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
|
|
|
|