I'm sorry, I guess I wasn't real clear on that - I've always known this
feature as a source directive, guess I didn't know that's not really an
established term.
What I'm referring to is much simpler than what you suggested - it's just
an equivalent to the "source" pre-processor directive in for e
On Sat, Jan 12, 2013 at 7:34 AM, Ben Ramsey wrote:
> On 1/12/13 9:19 AM, Derick Rethans wrote:
>
>> I'm liking this, why start with an function alias already when
>> introducing a new feature?
>>
>
> I figured this would be a frequent question, and I was right. :-)
>
> In earlier discussions (Jun
Hi!
> I can submit a new pull request against the master branch, if that's
> acceptable. This is intended for 5.5.
The patch should be against 5.5, I think. 5.5 is in alpha, so adding an
isolated function to it is no problem (we're still considering adding a
major language feature to it, so func
On Fri, Jan 11, 2013 at 7:17 PM, Ben Ramsey wrote:
> I've opened voting for the array_column() function RFC.
>
> You can vote at https://wiki.php.net/rfc/array_column#voting
No voting member, here, but I'd just like to say that I like the
function, but I hope the actual implementation will only p
Hi!
> Stas, I think you are misrepresenting this a bit. It's not about adding
> something "cool looking", it's about adding a feature that solves *this
> and many more* problems in a consistent way. A way that does *not*
> require to add a new function for every single array manipulation.
We alre
Hi!
> 2) Developers coming from other languages (Ruby, JavaScript, etc.) will
> instantly recognize array_pluck(). It's what they'll be looking for to
> do the same thing, but they won't be looking for array_column().
I say nuke the alias :) I like array_column (maybe because English is
not my
Fix bugs, develop features and contribute to the core.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 1/12/2013 1:10 PM, Peter Cowburn wrote:
On 12 January 2013 20:06, Galen Wright-Watson wrote:
Just to be clear, do you mean the result would be:
array($keys[0] => array($vals0[0], $vals1[0], ...),
$keys[1] => array($vals0[1], $vals1[1], ...),
...)
so the i-th item
On 12 January 2013 16:41, Ben Ramsey wrote:
>
> I must have misread the Git Workflow page of the wiki, which states:
>
> "A patch will be applied to the oldest possible branch. If the Release
> Manager of 5.3 accepts the change, commit it to the 5.3 branch. We will use
> regular merging between th
Hi,
On 01/12/2013 07:34 AM, Ben Ramsey wrote:
2) Developers coming from other languages (Ruby, JavaScript, etc.)
will instantly recognize array_pluck(). It's what they'll be looking
for to do the same thing, but they won't be looking for array_column().
-Ben
When I have to write JavaScri
I'm not sure that adding this functionality in array_map would actually
execute faster than doing array_combine($keys, array_map(null, $vals,
$vals2, $vals3));. I will need to do some benchmarks to test, but I'm sure
you will only see a performance improvement with extremely large arrays.
Also why
On 12 January 2013 20:06, Galen Wright-Watson wrote:
>
> Just to be clear, do you mean the result would be:
> array($keys[0] => array($vals0[0], $vals1[0], ...),
> $keys[1] => array($vals0[1], $vals1[1], ...),
> ...)
>
> so the i-th item in the result would be an array with
On Sat, Jan 12, 2013 at 11:41 AM, Thomas Hruska wrote:
> [...]
>
> The array_map() changes would allow for multiple arrays of values:
>
> array_map($keys, $vals, $vals2, $vals3);
>
[...]
>
> But it would execute faster if it were supported in array_map(). If it is
> supported in array_map(), then
Hi Ben,
Am 12.01.2013 um 01:17 schrieb Ben Ramsey :
> I've opened voting for the array_column() function RFC.
>
> You can vote at https://wiki.php.net/rfc/array_column#voting
I voted yes, but I prefer to call it just array_pluck (no aliases). It’s what
underscore.js calls it and my own pet pro
On 1/12/2013 10:46 AM, Alexey Zakhlestin wrote:
On 12.01.2013, at 21:34, Thomas Hruska wrote:
This would allow developers to do things like:
$keys = array('key1', 'key2', ..., 'keyn');
$vals = array('val1', 'val2', ..., 'valn');
$somemap = array_map($keys, $vals);
Which would result in $so
On Sat, Jan 12, 2013 at 5:29 PM, Rasmus Schultz wrote:
> I hear a lot of interesting arguments in this big annotation discussion,
> and now there's the ongoing vision discussion, which got me thinking.
>
> It is true that there is broad community interest in annotations - part of
> the problem he
On 1/12/2013 11:46 AM, Alexey Zakhlestin wrote:
There is a function for this: http://docs.php.net/array_combine
Nobody ever knows that one, I use it frequently, so useful.
--
-Clint
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 12.01.2013, at 21:34, Thomas Hruska wrote:
> This would allow developers to do things like:
>
> $keys = array('key1', 'key2', ..., 'keyn');
> $vals = array('val1', 'val2', ..., 'valn');
>
> $somemap = array_map($keys, $vals);
>
> Which would result in $somemap containing:
>
> array('key1'
On 1/12/13 10:13 AM, Peter Cowburn wrote:
1. Why is this branch based on 5.3, rather than 5.4 or 5.5? Do you
want this to be part of 5.3? The RFC (in particular the vote question)
does not make it clear where/when you want this to be added.
I mentioned this in another response on this thread. I
While we are on the general thought of arrays on this list, I was
originally going to put in an idea for a new function and let it simmer
for a while. Then I remembered that array_map() almost does what I
want, but not quite. Someone can start a RFC if they like this idea.
I thoroughly abuse
On Sat, Jan 12, 2013 at 7:35 AM, Levi Morrison wrote:
> > Can we re-write PHP with PHP? ;)
>
> Anthony and Nikita are already on it: https://github.com/ircmaxell/PHPPHP
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> Just wish
On 1/12/13 10:17 AM, Levi Morrison wrote:
1. Why is this branch based on 5.3, rather than 5.4 or 5.5? Do you
want this to be part of 5.3? The RFC (in particular the vote question)
does not make it clear where/when you want this to be added.
Please, this is not a bug or security fix. It does not
I hear a lot of interesting arguments in this big annotation discussion,
and now there's the ongoing vision discussion, which got me thinking.
It is true that there is broad community interest in annotations - part of
the problem here, is that different groups have differing opinions about
precise
On Sat, Jan 12, 2013 at 4:54 PM, Derick Rethans wrote:
> > I know that not everyone agrees with that philosophy, but I personally
> > don't like to add new features that can be easily covered by more
> > general solutions, or features that just represent a hack because the
> > more general soluti
> 1. Why is this branch based on 5.3, rather than 5.4 or 5.5? Do you
> want this to be part of 5.3? The RFC (in particular the vote question)
> does not make it clear where/when you want this to be added.
Please, this is not a bug or security fix. It does not belong in 5.3.
--
PHP Internals - PH
On 12 January 2013 00:17, Ben Ramsey wrote:
> I've opened voting for the array_column() function RFC.
>
> You can vote at https://wiki.php.net/rfc/array_column#voting
>
I like the idea of this function, but have a few minor questions re.
the current implementation.
1. Why is this branch based on
On 1/11/2013 11:53 PM, Anthony Ferrara wrote:
From what I can see this new function doesn't fit any of those three to a
significant enough extent. All three are definitely subjective, but I'm
leaning towards a no vote because I just don't feel there's enough
justification for the new function wh
In a semi-joke but oddly real concept. I get that the language proposals
(c++) are half jokes. But if we're going down that road, why don't we
consider rpython and building on top of HippyVM that's already partially
built... It would have a number of advantages over C:
1. It compiles to C, so shou
Not really insane.
PHPPHP is very powerful. Imagine someone that have no idea about C but
would love to propose something.
Just fork the project, add the desired support in PHP and propose here. I
guarantee it'll be easier to understand the caveats and the final patch
easily.
Cheers,
On Sat, Ja
My .02 cents here...
I'm used to array_pluck(), even when I first saw it I was like WTH is
that? When you read the description though, 'plucking' is a verb which
describes the action the function is taking, while column is a noun and
does not describe the action the function is taking.
In f
On Sat, 12 Jan 2013, Nikita Popov wrote:
> On Sat, Jan 12, 2013 at 6:57 AM, Stas Malyshev wrote:
>
> > This is a great illustration of different visions we have here. On
> > one hand, we have practical, immediate feature that covers a clear
> > use case and does not add any constructs or comple
On 1/12/13 9:19 AM, Derick Rethans wrote:
I'm liking this, why start with an function alias already when
introducing a new feature?
I figured this would be a frequent question, and I was right. :-)
In earlier discussions (June 2012), when I first introduced
array_column(), much of the discuss
On 1/12/13 9:14 AM, Peter Cowburn wrote:
The "Status" for this RFC is still "Under discussion" and on the RFC
listing page it is the same. Is not changing those two things simply
an oversight?
It was an oversight. I have corrected it in both places.
--
PHP Internals - PHP Runtime Development
On Fri, 11 Jan 2013, Stas Malyshev wrote:
> > Voting no, because - even though I like this feature in principle - I think
> > it's much better solved by introducing list comprehensions (which cover
> > this and many more cases in a consistent and elegant syntax), which is
> > something I have plan
On Fri, 11 Jan 2013, Ben Ramsey wrote:
> I've opened voting for the array_column() function RFC.
>
> You can vote at https://wiki.php.net/rfc/array_column#voting
I'm liking this, why start with an function alias already when
introducing a new feature?
cheers,
Derick
--
PHP Internals - PHP Ru
On 12 January 2013 00:17, Ben Ramsey wrote:
> I've opened voting for the array_column() function RFC.
>
> You can vote at https://wiki.php.net/rfc/array_column#voting
>
> Regards,
> Ben
>
The "Status" for this RFC is still "Under discussion" and on the RFC
listing page it is the same. Is not chan
On Sat, Jan 12, 2013 at 6:57 AM, Stas Malyshev wrote:
> Hi!
>
> > Voting no, because - even though I like this feature in principle - I
> think
> > it's much better solved by introducing list comprehensions (which cover
> > this and many more cases in a consistent and elegant syntax), which is
> >
The real problem here (in my opinion) is that `array_filter` does not
pass the key information to the callback. If you could do that, you
could select columns that way.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
38 matches
Mail list logo