|
Posted by Rik on 08/14/07 20:58
On Tue, 14 Aug 2007 22:49:50 +0200, Water Cooler v2 <wtr_clr@yahoo.com>
wrote:
> what's the use of having constants in an interpreted language like
> php, when there's no compile cycle?
>
> Other than enforcing programmer discipline or affording a convinience
> for the programmers, I don't see any.
1. Constants cannot be changed, overwritten, or unset (either deliberately
or by accident). Certainly on projects with more programmers this really
pays off.
2. Constants are always in scope.
Then again, that's all about enforcing discipline and convenience
offcourse.
--
Rik Wasmus
Navigation:
[Reply to this message]
|