03-16-2009, 09:11 PM
|
#7 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
|
Quote:
Originally Posted by delayedinsanity
I always thought it was to resolve ambiguous names, and things like include() and require() were used to avoid loading lots of functions that you do not need.
PHP Code:
$user_registration = new user::register; $new_session = new session::register;
$mybb = new mybb::redirect; $lucid = new lucid::redirect;
Seems namespaces would be the perfect alternative to search and replace?
|
Coming from a C++ brackground, that is not the case. In C++, many standard includes (Iostream for example) have hundreds of functions covering both in and out functions. When you just want to output data without loading the cIn functions, you write the command "std::cout << "text""
While it does work for resulving ambigous names, your functions probably should not be named directly after language level functions.
|
|
|
|