View Single Post
Old 03-16-2009, 09:11 PM   #8 (permalink)
Village Idiot
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by delayedinsanity View Post
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.
__________________

Village Idiot is offline  
Reply With Quote