Req #78167 [Opn->Wfx]: Make Generators implement the rewind() method
| From: | requinix@php.net | Date: | Sat, 15 Jun 2019 02:12:34 +0000 |
| Subject: | Req #78167 [Opn->Wfx]: Make Generators implement the rewind() method | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221329@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78167&edit=1
ID: 78167
Updated by: requinix@php.net
Reported by: abumar2811NOSPAM at mail dot com
Summary: Make Generators implement the rewind() method
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
Package: *General Issues
PHP Version: 7.4.0alpha1
Block user comment: N
Private report: N
New Comment:
No. Generates re-invoking code when rewound would be "magical" and not in the good way.
And they definitely need to be iterators because that's half the point of what a generator is,
besides the fact that all the other iterator methods are completely reasonable for it to have.
Previous Comments:
------------------------------------------------------------------------
[2019-06-14 19:23:21] abumar2811NOSPAM at mail dot com
Description:
------------
Why implementing an interface.......... without actually implementing it???
Please make rewind() call the "generator's factory" again, with the same
arguments as the original call.
Either that or remove Iterator from the interfaces implemented by Generator.
Thank you
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78167&edit=1