Re: Types on the right or on the left
| From: | Yasuo Ohgaki | Date: | Sun, 25 Jan 2015 01:27:00 +0000 |
| Subject: | Re: Types on the right or on the left | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81101@lists.php.net to get a copy of this message | ||
Hi all,
On Tue, Nov 4, 2014 at 5:50 AM, Stas Malyshev <smalyshev@sugarcrm.com>
wrote:
> > Again, an unfair comparison. Hack isn’t intended to be a completely
>
> I'm not sure what you refer to by "fair". Hack is not "intended", but
> IS
> a separate language - just read the manual and you will see, it is a new
> language which borrows some syntax from PHP. Just read their own site:
>
> Hack is a programming language for HHVM that interoperates seamlessly
> with PHP.
>
> I completely agree with this statement - Hack is a programming language
> that is different from PHP but built in a way to interoperate with it.
I agree with Stas also.
We may have both for compatibility and consistency. Hack may adopt later if
they want.
e.g.
Both
class Bar { public Foo $var; function( Foo $var); }
and
class Bar { public $var : Foo; function($var : Foo); }
may be accepted under PHP. Not many people care about a little compile time
overhead today.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net