Tell you what -- 10 uses of opendir shouldnt take too long to replace; write
the code and let's see how it actually looks. Us all sitting in the list
bikeshedding won't be much use, but if it makes the code cleaner, hey win!

-- brion
On Dec 21, 2010 9:16 AM, "Soxred93" <[email protected]> wrote:
>>
>> Before going into too much detail on the thread, consider what you
actually
>> need out of a fancy directory iterator. Offhand, I really can't think of
>> many places where that even *happens* in MediaWiki... maybe when purging
>> thumbnails?
>>
> I count 10 instances of opendir() exactly in trunk.
>
>> takes more
>> effort than just using things built into PHP (there's at least 3 or for
>> directory iterator systems already, including the opendir() stuff, the
>> object-oriented variant in the Dir class, and the SPL iterators).
>
> The main part of my push for this is that it isn't a new feature, but an
easier way to read and write code. Myself, at least, readdir(), opendir(),
etc is very arcane and confusing (same reason I don't use fopen, etc). RDI
and SPL are even more confusing. I'm just going from ym own experience here,
but I'm just thinking that it would be a good addition.
>
> -X!
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to