# [VOTE] Bare Name Array Literal/Dereference

- Thread: https://externals.io/message/75005
- Original archive: https://news-web.php.net/php.internals/75005
- Started by Andrea Faulds on 2014-06-19T23:44:52+00:00
- Messages: 12
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #75005 — Andrea Faulds — 2014-06-19T23:44:52+00:00

URL: https://externals.io/message/75005#75005

Good evening,

I managed to somehow miss that the 2 week minimum to hold a vote had passed this weekend for my Bare Name Array Literal and Bare Name Array Dereference RFCs. Oh well, better late than never.

I hereby announce that I have opened the vote for both RFCs. Both require a 2/3 majority, and both will end on 2014-06-27, a week’s time.

https://wiki.php.net/rfc/bare_name_array_literal#vote

https://wiki.php.net/rfc/bare_name_array_dereference#vote

Thanks!

--
Andrea Faulds
http://ajf.me/

---

## #75006 — Adam Harvey — 2014-06-19T23:57:20+00:00

URL: https://externals.io/message/75005#75006 · In reply to: #75005

I try to be in the habit of explaining my -1s, so I'll explain them
below. They're both reasons that came up in the earlier discussion
thread.


> https://wiki.php.net/rfc/bare_name_array_literal#vote

Johannes isolated an issue I kind of danced around in my own thinking
here: http://news.php.net/php.internals/74694 — the difference in
behaviour between a constant called FOO when you have [FOO: ''] versus
[FOO => ''] is extremely unintuitive, and is going to burn users.

Sadly, this probably means there isn't a sensible way to implement
unquoted keys in PHP array declarations, no matter how you slice the
syntax. Such is life.

> https://wiki.php.net/rfc/bare_name_array_dereference#vote

As I said earlier, I think the syntax here is visually confusing with
object property/method access. If there was an obvious digraph that
was completely distinct from -> and still somehow implied array member
access I'd be more open to this, but I really can't think of one, and
:> isn't it.

Adam

---

## #75008 — Stas Malyshev — 2014-06-20T00:26:15+00:00

URL: https://externals.io/message/75005#75008 · In reply to: #75006

Hi!

> I try to be in the habit of explaining my -1s, so I'll explain them
> below. They're both reasons that came up in the earlier discussion
> thread.

Agreeing to all this, but for me it is much more important that we do
not actually need it (it doesn't allow to do anything we could not do
before), it makes the language more complex (two ways of doing array
elements instead of one) and the win is negligible (you save 3
characters per key). On the other side, every tool that does PHP would
need to be updated to support this, and everybody using PHP would have
to learn to read the new syntax and work with it along with the old one.
IMHO not worth it.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #75018 — Nikita Popov — 2014-06-20T14:32:04+00:00

URL: https://externals.io/message/75005#75018 · In reply to: #75005

> Good evening,
>
> I managed to somehow miss that the 2 week minimum to hold a vote had
> passed this weekend for my Bare Name Array Literal and Bare Name Array
> Dereference RFCs. Oh well, better late than never.
>
> I hereby announce that I have opened the vote for both RFCs. Both require
> a 2/3 majority, and both will end on 2014-06-27, a week’s time.
>
> https://wiki.php.net/rfc/bare_name_array_literal#vote
>
> https://wiki.php.net/rfc/bare_name_array_dereference#vote
>
> Thanks!
>

Hey Andrea!

It seems like you have reused the same vote for both RFCs. Could you please
separate them?

Nikita

---

## #75019 — Ingwie Phoenix — 2014-06-20T14:35:51+00:00

URL: https://externals.io/message/75005#75019 · In reply to: #75018

Am 20.06.2014 um 16:32 schrieb Nikita Popov <nikita.ppv@gmail.com>:

> 
> 
> > […]
> 
> Hey Andrea!
> 
> It seems like you have reused the same vote for both RFCs. Could you please
> separate them?
> 
> Nikita


Uh, stupid question. But how do I vote? Do I have to own a Wiki account? I would really like to put in my vote…
Kind regards, Ingwie

---

## #75020 — Ferenc Kovacs — 2014-06-20T14:55:39+00:00

URL: https://externals.io/message/75005#75020 · In reply to: #75019

On Fri, Jun 20, 2014 at 4:35 PM, Ingwie Phoenix <ingwie2000@googlemail.com>
wrote:

>
> Am 20.06.2014 um 16:32 schrieb Nikita Popov <nikita.ppv@gmail.com>:
>
> > […]
> require
> > […]
> please
> > […]
>
>
> Uh, stupid question. But how do I vote? Do I have to own a Wiki account? I
> would really like to put in my vote…
> Kind regards, Ingwie
>
>
see https://wiki.php.net/rfc/voting
you can vote if you have a php.net account (so basically already a
contributor to the project) or if you are a representative from the PHP
community, but we don't really hand out voting rights on that base.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

---

## #75028 — Andrea Faulds — 2014-06-21T19:42:12+00:00

URL: https://externals.io/message/75005#75028 · In reply to: #75018

Good evening,

Looks like I made a mistake when I created the voting widgets for the RFCs:



> Hey Andrea!
> 
> It seems like you have reused the same vote for both RFCs. Could you please separate them?
> 
> Nikita

I had no idea the vote title had actual importance. They now both have different titles. (Side note: That explains the identical vote patterns, I suppose.)

As a result the votes are restarted for both, and will now both end on 2014-06-28. I’m really sorry to make you all go through the hassle of voting again.

https://wiki.php.net/rfc/bare_name_array_literal#vote

https://wiki.php.net/rfc/bare_name_array_dereference#vote

By the way, the literal RFC was updated to note the implications for named parameters, were they to happen.

--
Andrea Faulds
http://ajf.me/

---

## #75031 — Thomas Bley — 2014-06-21T20:05:48+00:00

URL: https://externals.io/message/75005#75031 · In reply to: #75028

Hello Andrea,

just for simplicity, using $array->key instead of $array:>key would be nice.

Regards
Thomas

Andrea Faulds schrieb am 21. Juni 2014 21:42:

> Good evening,
> 
> Looks like I made a mistake when I created the voting widgets for the
> RFCs:
> 
> 
> 
> > […]
> 
> I had no idea the vote title had actual importance. They now both have
> different titles. (Side note: That explains the identical vote patterns, I
> suppose.)
> 
> As a result the votes are restarted for both, and will now both end on
> 2014-06-28. I’m really sorry to make you all go through the hassle of
> voting again.
> 
> https://wiki.php.net/rfc/bare_name_array_literal#vote
> 
> https://wiki.php.net/rfc/bare_name_array_dereference#vote
> 
> By the way, the literal RFC was updated to note the implications for named
> parameters, were they to happen.
> 
> --
> Andrea Faulds
> http://ajf.me/

---

## #75033 — Andrea Faulds — 2014-06-21T20:16:32+00:00

URL: https://externals.io/message/75005#75033 · In reply to: #75031

> just for simplicity, using $array->key instead of $array:>key would be nice.

It would be. The problem with that, though, is that it would limit possibly more useful ideas in that space, for example, we couldn’t implement Nikita’s scalar methods,* which I’d very much like.

*Technically, we still could, but it’d be a bit confusing IMO, and I’d like to see certain scalar properties as well, ->length for instance.
--
Andrea Faulds
http://ajf.me/

---

## #75034 — Thomas Bley — 2014-06-21T20:59:35+00:00

URL: https://externals.io/message/75005#75034 · In reply to: #75033

Are "scalar" methods also for arrays?

Regards
Thomas

Andrea Faulds schrieb am 21. Juni 2014 22:16:

> 
> 
> 
> > […]
> 
> It would be. The problem with that, though, is that it would limit
> possibly more useful ideas in that space, for example, we couldn’t
> implement Nikita’s scalar methods,* which I’d very much like.
> 
> *Technically, we still could, but it’d be a bit confusing IMO, and I’d
> like to see certain scalar properties as well, ->length for instance.
> --
> Andrea Faulds
> http://ajf.me/

---

## #75035 — Andrea Faulds — 2014-06-21T21:01:34+00:00

URL: https://externals.io/message/75005#75035 · In reply to: #75034

> Are "scalar" methods also for arrays?

Yeah, they ought to be “scalar and array methods”, I suppose.
--
Andrea Faulds
http://ajf.me/

---

## #75129 — Andrea Faulds — 2014-06-28T21:24:36+00:00

URL: https://externals.io/message/75005#75129 · In reply to: #75005

> https://wiki.php.net/rfc/bare_name_array_literal#vote
> 
> https://wiki.php.net/rfc/bare_name_array_dereference#vote

The vote for both has now ended. Both have failed to pass and will join the pile of Rejected RFCs. Thanks for voting.

--
Andrea Faulds
http://ajf.me/
