You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by Christian Grobmeier <gr...@gmail.com> on 2009/08/04 13:40:07 UTC

Use of SPL

Hi guys,
just realized this:
http://de.php.net/manual/en/book.spl.php

This makes everything more OOP. Its delivered by default with PHP 5.0
and cannot be disabled with PHP 5.3.
I really think this makes code cleaner and faster in some cases, since
this is a C library. Wellknown patterns
like Iterator are included.

I really think we should make use of this great lib.

Any experiences from you with that lib? Opinions?

Best,
Christian

Re: Use of SPL

Posted by Christian Grobmeier <gr...@gmail.com>.
>> Any experiences from you with that lib? Opinions?
>
> I liked the idea of the SPL when it was started but honestly I never
> got into the situation to actually need anything of it.

Good!

> In contrast to Java, hashes and arrays are already built in and
> Double Linked Lists or DirectoryIterators are not so commonly used so
> it did not become as important as the Java Collections API.

Thats true

> But if you know some part of log4php that could make use of it, I
> would certainly favour  of doing so.

since they ArrayObject f.e. is an object, we don't need such stuff
like & operators for pointers anymore. We could use plain references
in java like style instead, and this would be a great benefit for
readability imho.

But I see I am running against open doors. I am opening an issue for
any patches which come in addressing this  ;-)

Thanks,
Christian

Re: Use of SPL

Posted by Christian Hammers <ch...@lathspell.de>.
Am Tue, 4 Aug 2009 13:40:07 +0200
schrieb Christian Grobmeier <gr...@gmail.com>:

> Hi guys,
> just realized this:
> http://de.php.net/manual/en/book.spl.php
> 
> This makes everything more OOP. Its delivered by default with PHP 5.0
> and cannot be disabled with PHP 5.3.
> I really think this makes code cleaner and faster in some cases, since
> this is a C library. Wellknown patterns
> like Iterator are included.
> 
> I really think we should make use of this great lib.
> 
> Any experiences from you with that lib? Opinions?

I liked the idea of the SPL when it was started but honestly I never
got into the situation to actually need anything of it.

In contrast to Java, hashes and arrays are already built in and 
Double Linked Lists or DirectoryIterators are not so commonly used so
it did not become as important as the Java Collections API.

But if you know some part of log4php that could make use of it, I
would certainly favour  of doing so.

bye,

-christian-