• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] Namespace length (CodeIgniter4 Roadmap?)

#1
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
God Bless CI Contributors Smile
Reply

#2
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.
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply

#3
(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.
God Bless CI Contributors Smile
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.