gino pilotino - 2013-03-21 21:42:47 - In reply to message 2 from Manuel Lemos
let me dissent, imho it's not that natural. if i want to use strict type checking, then i'll go with a language that supports it by design. this is far more "natural" than trying to retrofit any peculiar property belonging to some other language; this often looks more like a nasty hack. people use php because it *lacks* features :) and this is completely understandable as it belongs to a different domain than java or something alike.
Manuel Lemos - 2013-03-21 21:52:46 - In reply to message 3 from gino pilotino
PHP is a dynamic typed language, so you cannot have strict type checking at compile time (yes PHP is compiled before it is executed).
Anyway, in general people do not want strict type checking, they just want to get warnings when you are passing the wrong types of values to functions as that is a symptom you have bugs in your code. If you do not have bugs, type checking is not necessary.
Anyway, PHP already has type hinting as a built-in feature. The classes that emulated type checking are no longer necessary in the current PHP versions.
gino pilotino - 2013-03-21 23:26:26 - In reply to message 4 from Manuel Lemos
As a php developer, I know what php provides :) let me relaborate.
Between the 26 points listed, Java covers about 70% _out of the box_, Scala about 90%. So it's more natural to me to chose a more feature rich language if I *really* want to use this kind of stuff in my everyday programming.
So why use php ? because in some scenario I *don't need* those features that otherwise would be counterproductive. It would be clumsy to chose Php *then* plug-in 20 external libraries that let me use it like it was java, scala, python, ruby or something else.
About the sentence "in general people do not want strict type checking, they just want to get warnings when you are passing the wrong types". Well, this is exactly what I meant when I said "people use php because it *lacks* some features" and not because you can plug new ones that other languages support by design.