CodeIgniter Forums

Full Version: [split] Namespace length (CodeIgniter4 Roadmap?)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, is it too long for the namespace \CodeIgniter ?
e.g
PHP Code:
class Process extends \CodeIgniter\Controller {
 public function 
__construct() {
 
  parent::__construct();
 }


what if something like \CI\Controller ..
I love the way CI_Controller easy to type and compose classes

sorry for bad english I hope you understand my point
While I definitely understand how it would be nicer to type less and use something simpler like CI, that doesn't keep it really all that safe from name collisions with other packages. Someone might have initials CI, or might have a company with that name, or might be part of a continuous integration server, etc. To keep those namespaces from colliding we have to keep a more descriptive, read longer, namespace.

Good IDE's can insert that for you. Good editors usually have some form of snippet solution that can help reduce typing like this, and there are tools like TextExpander that can help you throughout your operating system, if you want to use them.
(06-24-2016, 10:46 PM)kilishan Wrote: [ -> ]While I definitely understand how it would be nicer to type less and use something simpler like CI, that doesn't keep it really all that safe from name collisions with other packages. Someone might have initials CI, or might have a company with that name, or might be part of a continuous integration server, etc. To keep those namespaces from colliding we have to keep a more descriptive, read longer, namespace.

Good IDE's can insert that for you. Good editors usually have some form of snippet solution that can help reduce typing like this, and there are tools like TextExpander that can help you throughout your operating system, if you want to use them.

Now I understand the reason why. The reason why I love CI_Controller and CI_Model its because I use shift once. unlike I type CodeIgniter I use it twice, but its not a bigdeal but I think it will be an issue for me. I use to misspell the words with shift. as what you have said good IDE may solve my problem in typo errors.