Dave Ingram wrote:
Cristian Rodríguez wrote:
class MyTestClass {
  public function blah(Foo $f);
  public function blah(Bar $b);
  public function blah($v);
}
Looks like you are using the wrong language, you need JAVA instead.
Yes, I'll admit it does look like Java (or any C++-like OO language) -
but PHP already does some type hinting, and IMO it can be very useful as
an additional sanity check.


Dave


I am a Java developer :p and PHP and AS3 (they're my primary languages), some things are good regardless of what language they're from, it's not exactly a major shift to generics or packages that I'm suggesting, just natural progression from type-hinting and most useful whatever language you are in.

I daily switch between PHP and Java and there are only a few things that make logical sense to have in a language that I miss when back on php; primitives, multiple method signatures, and the ability to call a class member function without using this; however I'm well aware the latter is impossible since PHP is both procedural and OO.

Regards!

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to