I've written PHP, Java, Javascript, C#, C++, C, and VB (and have dabbled in Ruby and Python), and I still don't get the hate for PHP. Granted, weakly-typed variables are a bit aggravating, but that's the only major complaint I have with it.
A lot of that can be alleviated simply by having a language that does not overload operators across types, such as "+" for addition and concatenation, and by having optionally type-validated parameters.
ColdFusion may suck in other ways, but it got these two things mostly right. Witness the function parameter (argument) declaration definition:
<cfargument name="string"
default="default value"
displayname="descriptive nam
by Anonymous Coward writes:
on Monday March 23, 2015 @10:23PM (#49324825)
A lot of that can be alleviated simply by having a language that does not overload operators across types, such as "+" for addition and concatenation, and by having optionally type-validated parameters.
You're on the wrong article this article is about php not javascript.
The summary does mention JavaScript. And Php still has the problem for equality operators (greater than, equal, etc.). Then again, ColdFusion didn't quite settle equality comparing either.
FORTUNE'S FUN FACTS TO KNOW AND TELL:
A firefly is not a fly, but a beetle.
Never understood the PHP hate (Score:3, Insightful)
I've written PHP, Java, Javascript, C#, C++, C, and VB (and have dabbled in Ruby and Python), and I still don't get the hate for PHP. Granted, weakly-typed variables are a bit aggravating, but that's the only major complaint I have with it.
A better model for Dynamic Typing (Score:2)
A lot of that can be alleviated simply by having a language that does not overload operators across types, such as "+" for addition and concatenation, and by having optionally type-validated parameters.
ColdFusion may suck in other ways, but it got these two things mostly right. Witness the function parameter (argument) declaration definition:
Re:A better model for Dynamic Typing (Score:0)
A lot of that can be alleviated simply by having a language that does not overload operators across types, such as "+" for addition and concatenation, and by having optionally type-validated parameters.
You're on the wrong article this article is about php not javascript.
Re: (Score:1)
The summary does mention JavaScript. And Php still has the problem for equality operators (greater than, equal, etc.). Then again, ColdFusion didn't quite settle equality comparing either.