4 ms·
> One of my favorite features is type enforcement ... that's a feature that pretty much every other language either already has (and does better), or explicitl
by Shish2k 12y ago
> One of my favorite features is type enforcement
... that's a feature that pretty much every other language either already has (and does better), or explicitly does something different (but better) :S
Specifically, every other langage that I know of with type checking support has type checking for classes and primitives. PHP, not so much:
function test(integer $z) {
print $z + 1;
}
test(42);
PHP Catchable fatal error: Argument 1 passed to test()
must be an instance of integer, integer given