2013/8/22 David Harkness <david.h@xxxxxxxxxxxxxxxxx> > On Wed, Aug 21, 2013 at 7:56 PM, Curtis Maurand <curtis@xxxxxxxxxxx>wrote: > >> Sebastian Krebs wrote: > > > Actually the problem is, that the dot "." is already in use. With > > > $foo.bar() you cannot tell, if you want to call the method "bar()" on >> the >> > object "$foo", or if you want to concatenate the value of "$foo" to the >> > result of the function "bar()". There is no other way around this than a >> > different operator for method calls. >> >> I didn't think >> of that. It seems to me there could be an easier operator than -> >> which sometimes will make me stop and look at what keys I'm trying to >> hit. Just a thought. I forgot about the concatenation operator >> which is "+" in Java/C# >> > > The PHP language developers were pretty stuck. Because of automatic > string-to-numeric-conversion, they couldn't use + for string concatenation. > Sadly, they chose "." rather than ".." which I believe one or two other > languages use. If they had, "." would have been available once objects > rolled around in PHP 4/5. I suspect they chose -> since that's used in C > and C++ to dereference a pointer. > Actually I think ".." is quite error-prone, because it is hard to distinguish from "." or "_" on the _first_ glance, which makes the get quickly through the code. [1] So "." is maybe not the best choice, but also remember when it was introduced: That was decades ago. That time it was (probably ;)) the best choice and nowadays I don't think it is too bad at all, beside that _other_ languages use it for other purposes now ;) [1] Yes, I know, that "_" is not an operator, but mixed with strings and variables names it is there ;) > > >> > Ever tried the jetbrains products? :D (No, they don't pay me) >> >> I have not, but it looks interesting. >> I'll have to try it. > > > Those are very good products which have had a strong following for a > decade. The free IDE NetBeans also has quite good support for both Java and > PHP, and the latest beta version provides a "web" project that provides > front- and back-end debugging of PHP + JavaScript. You can be stepping > through JS code and hit an AJAX call and then seamlessly step through the > PHP code that handles it. > > I use NetBeans for PHP/HTML/JS (though I am evaluating JetBrains' PHPStorm > now) and Eclipse for Java. You can't beat Eclipse's refactoring support in > a free tool, though I think NetBeans is close to catching up. I would bet > IntelliJ IDEA for Java by JetBrains is on par at least. > Eclipse' code-completion and debugger never worked for me well (and most of the time: at all). It became slower and less responsive with every release. That was the reason I decided to leave it and I don't regret it :) > > Peace, > David > > -- github.com/KingCrunch