We are a collective of people who believe in freedom of speech, the rights of individuals, and free pancakes! We share our lives, struggles, frustrations, successes, joys, and prescribe to our own special brand of humor and insanity. If you are looking for a great place to hang out, make new friends, find new nemeses, and just be yourself, WTF.com is your new home.
I've always thought other languages were too wordy in that regard, even before I knew php. An interpreted language, especially one that uses a JIT(and if you read, those "Implicitly typed " vars still get JIT'd), has no need for var type declarations; i = 5 should automatically be recognized as an int, i = "foobar" a string, and so on. $i = 5 and $i = foobar are just as readable. Just like in Python, where i = 5 is an int and i = foobar is a string.
Seriously, if there are any benefits of declaring every single variable as int = 5 and string = “foobar” then please enlighten me.
Don’t get me wrong though, I’m not trying to compare languages here, it’s just one of the things I like about php.(which I only used as an example)
I know from personal experience that when working with datatypes, like int, float, or double, there are instances where you have to declare exactly what it is. Or look at function overloading. Without explicitly declared variables, that would get quite muddy.
And by the way, I like that about php too, but in higher level languages like C#, you need to be explicit.
I guess it's just a difference of opinion. I've never saw a need for it, save for in a low-level languages like C. I've written some pretty large apps in both C and Python, and while I see it's need in C, I don't think languages like C#, Java or Python need it.
Anyway, it's a minor aggravation and intellisense takes care of it for the most part.