You are here: Re: use of constants in an interpreter environment « PHP Programming Language « IT news, forums, messages
Re: use of constants in an interpreter environment

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация