On 2012-08-19 04:08, Levi Morrison wrote:
On Sat, Aug 18, 2012 at 12:42 AM, Alexey Zakhlestin wrote:
On 16.08.2012, at 0:18, Rasmus Schultz wrote:
How come there is no straight-foward obvious way to simply remove a given
value from an array?
Well, this sounds like a reason for creating Sp
On Sat, Aug 18, 2012 at 5:48 PM, Nikita Popov wrote:
> On Sat, Aug 18, 2012 at 6:34 AM, Laruence wrote:
>> Hi:
>> This feature introduces list() support in foreach constructs(more
>> info can be found here: https://wiki.php.net/rfc/foreachlist).
>>
>> please vote for this: https://wiki.php.
Hi!
> For PHP we would need to have some similar behavior. PHP's current
> exception model is incompatible with GeneratorExitException (because
> PHP does not have BaseExceptions). So what I'd probably do instead is
> monkeypatch a ZEND_RETURN opcode at the current execution position and
Patching
On 19/08/12 01:39, Morgan L. Owens wrote:
On 2012-08-19 10:25, Andrew Faulds wrote:
On 18/08/12 14:52, Morgan L. Owens wrote:
How simple is it? Does it:
1) Remove one occurrence of the element (presumably the first) or all?
2) Reindex the array (as someone else argued was necessary to make it
On 2012-08-19 10:25, Andrew Faulds wrote:
On 18/08/12 14:52, Morgan L. Owens wrote:
How simple is it? Does it:
1) Remove one occurrence of the element (presumably the first) or all?
2) Reindex the array (as someone else argued was necessary to make it
"properly indexed" afterwards) or not?
3) M
On 18/08/12 14:52, Morgan L. Owens wrote:
Rasmus Schultz wrote:
> I disagree - this is (or should be) a simple, atomic operation...
> yet, you've got a function-call, an intermediary variable, a boolean
> test, and an unset statement repeating the name of the array you're
> deleting from.
>
> Th
On 18/08/12 03:36, Tjerk Meesters wrote:
Sent from my iPhone
On 18 Aug, 2012, at 5:41 AM, Sebastian Krebs wrote:
Hi,
Don't know, how complicated this is (and also someone (not me) must implement
it, because I can't :X), but to be in sync with the operators the short ternary
operator shoul
On 17/08/12 22:41, Rasmus Lerdorf wrote:
On 08/17/2012 05:35 PM, Rasmus Schultz wrote:
Most other languages have more than one collection-type... since PHP has
only the single, hybrid array-type which acts both as a hash and as an
array, something like this ought to be available.
I don't know w
Nikita Popov wrote:
I don't understand this argument. Generator functions are transparent
to the user. You use a generator function just like you would use a
function that returns an array. From a user point of view it does not
matter whether getLinesFromFile() is just a function returning an
ar
( resending with correct formatting, and missing context while at it, sorry
about that )
On Aug 15, 2012, at 8:33 PM, Nikita Popov wrote:
> (...)
>
> Another aspect here is that there is no reasonable syntax for this
> feature, at least I can't think of one:
>
> * The syntax `$foo = (Interface
On Sat, Aug 18, 2012 at 12:42 AM, Alexey Zakhlestin wrote:
>
> On 16.08.2012, at 0:18, Rasmus Schultz wrote:
>
>> How come there is no straight-foward obvious way to simply remove a given
>> value from an array?
>
> Well, this sounds like a reason for creating SplSet class
>
There's already SplO
On Sat, Aug 18, 2012 at 4:12 PM, wrote:
> Since this is yet another area where 'one does not have to use it if one
> does not want to' ... FLAGGING to the other users that a function is a
> 'special one' rather than just a normal function with a generator function
> seems to me just a necessity?
On 08/18/2012 10:12 AM, les...@lsces.co.uk wrote:
> Since this is yet another area where 'one does not have to use it if one
> does not want to' ... FLAGGING to the other users that a function is a
> 'special one' rather than just a normal function with a generator function
> seems to me just a nec
> On Sat, 11 Aug 2012, Nikita Popov wrote:
>
>> Hi internals!
>>
>> I think there already was a lot of discussion on the generators, so
>> it's time to move to the next step. I'd like to vote on the feature in
>> two weeks, so this the "announce[ment] on internals@, by the author,
>> with the inten
Rasmus Schultz wrote:
> I disagree - this is (or should be) a simple, atomic operation...
> yet, you've got a function-call, an intermediary variable, a boolean
> test, and an unset statement repeating the name of the array you're
> deleting from.
>
> This should be a simple statement or function
On Thu, Aug 9, 2012 at 4:49 AM, Sherif Ramadan wrote:
>>
>> One question, though: It looks based on the voting like finally {} blocks
>> are going in. So... what should happen in the following situation:
>>
>> function stuff() {
>> try {
>> foreach (range(1, 100) as $i) {
>> yield $i;
On Thu, Aug 9, 2012 at 4:49 AM, Sherif Ramadan wrote:
>>
>> One question, though: It looks based on the voting like finally {} blocks
>> are going in. So... what should happen in the following situation:
>>
>> function stuff() {
>> try {
>> foreach (range(1, 100) as $i) {
>> yield $i;
On Sat, Aug 18, 2012 at 2:21 PM, Derick Rethans wrote:
> I've some comments how that I've read the RFC:
>
>> Recognition of generator functions
>>
>> 1. Any function which contains a yield statement is automatically a
>> generator function.
>>
>> 2. The initial implementation required that generat
On Sat, 11 Aug 2012, Nikita Popov wrote:
> Hi internals!
>
> I think there already was a lot of discussion on the generators, so
> it's time to move to the next step. I'd like to vote on the feature in
> two weeks, so this the "announce[ment] on internals@, by the author,
> with the intention of
On Tue, Aug 14, 2012 at 7:59 PM, Aaron Holmes wrote:
> Thanks for clarifying. It makes sense now, considering foreach's behavior
> and the generators statefulness allowing what otherwise seems inconsistent.
> However, might it make sense to no-op instead of erroring? If generators
> allow rewind()
On Sat, Aug 18, 2012 at 6:34 AM, Laruence wrote:
> Hi:
> This feature introduces list() support in foreach constructs(more
> info can be found here: https://wiki.php.net/rfc/foreachlist).
>
> please vote for this: https://wiki.php.net/rfc/foreachlist#vote
Hi Lauruence!
Is this vote just fo
21 matches
Mail list logo