Re: For Wez : Stream Abstraction over a String
| From: | Andrei Zmievski | Date: | Tue, 23 Oct 2001 15:04:19 +0000 |
| Subject: | Re: For Wez : Stream Abstraction over a String | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-68833@lists.php.net to get a copy of this message | ||
On Tue, 23 Oct 2001, l0t3k wrote:
> > Perhaps I'm missing something, but can you explain how this is better
> > than what we have now?
> the power of abstraction <g>
Yes, but abstraction is not always necessary, wouldn't you agree?
> i'll give you an example of why i want it. im working on resultset caching
> in a DB astraction layer, and im giving the user the option of saving to XML
> or a more compact format. i'd like to give the user options as to how and
> where the data is stored. if the user has file system access and wants to do
> it that way, then fine. if however, they want to use the session mechanism
> and stick it into a zval string, then its gravy. the point is to allow for
> flexibility.
> in any case, its a pain to have to write two sets of code to write to a
> 'proper' stream (file or sockets) , and to write another set of routines to
> store to a string. with a unified approach, you get the flexibility you need
> all for free.
Hmm, well, there is no such thing as a free lunch.. :)
-Andrei
* "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis *