Re: Introducing "Array Of" RFC

From: Date: Mon, 20 Jan 2014 07:43:23 +0000
Subject: Re: Introducing "Array Of" RFC
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-71302@lists.php.net to get a copy of this message
Hi!

> After a little thought, I think I'd rather we use the HHVM syntax here. 
> Having "Array" for an untyped array but "Bar[]" for a typed one is 
> silly. "Array" and "Array<Bar>" make more sense. Being able to type
> keys 
> would be nice, too.

Except that there's no type "array<Bar>" in PHP, so we're just inventing
things out of the thin air that mean nothing. Just because some other
language has common syntax - which in *that* language means something,
since they actually have typed arrays. But in PHP it doesn't mean
anything except being pulled in to save couple of lines of code. I think
we should not do such things in PHP - if we want to have language that
makes sense and not just a hodgepodge of random syntax constructs pulled
from all over the place and hastily bolted on together - we should not
put in any syntaxes that do not make sense in the rest of the language.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227


Thread (46 messages)

« previous php.internals (#71302) next »