Syntax Coloring for $this->var |
Site Admin
|
but it may make ugly things too. For example you may have a function (not method) and use $this as a regular variable containing a class instance so there will be some $this-> calls. If we start highlighting $this differently, it will also highlight $this in such functions too because highlighter has no ability to track current context and treat tokens differently depending on they appear in a class method or not. Misleading results is what will be threre.
|
||||||||||||
_________________ The PHP IDE team |
|
Dimitri: in Poland we say that you are looking for a hole in the whole. I think every PHP developer knows that $this is a somewhat special variable and can understand that it's highlighted differently. Also it will be posible to change color in settings.
|
||||||||||||
|
Veteran
|
... wenihal ... in Poland we say "pick nits" (szukac dziury w calym?)
But back to this topic... As for me, it will be not easier to work with classes if $this-> would have other colouring. This has no sense in fact. Something like this would have more sense (and what I think schould be done): public function delete() {} public function ondelete() {} This could of course have same colouring, but becouse now "delete" is colored in other way than "ondelete". And like in some post of this forum, $this->var schould have same colouring than eg. $this->thisisvar At an above cases there is a possibility to check current context? Isnt it? Every word starts with $ schould have same colour - and this is my opinion. Regards and Respect |
||||||||||||
_________________ ML |
|
This is simply 2 completely different ways to work, it's a "preference". If $this-> being a different color is so detrimental, then simply make it the same color in the options as other vars.
At least the people who want it will have the OPTION to set to a different color. Set it to the normal variable color by default, so it wont affect anyone who wants it the same. I actually do not use "$this" as a standard var because I treat it as reserved. |
||||||||||||
|
|
I agree. I never run out of variable names to use to actually use "$this" out of context. Somebody enlighten me (us) of when its a good idea to use the word "this" as a regular variable? my lately repeated quote "Well... Dreamweaver does it" I'm too much involved with PHPED that Dreamweaver is now old school. (like textpad) I DEFINETLY miss this option from DreamWeaver though. |
||||||||||||||
|
|
It looks like most of the posts comes from people that used Dreamweaver in their php starts.
I agree that $this should be as it was before, but it make sense to color $_GET, $_POST, $_COOKIE and $_SERVER variables different as they are global and since PHPEd is heavily OOP (thank you for that), global vars are the most dangerous once, don't you think? PHPEd made a huge difference in tracking all references (so I can do $this->object1->object2->doThings()). Of course there is always rooms for more, like tracking singleton registry reference and similar. |
||||||||||||
|
Syntax Coloring for $this->var |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by