Zeev Suraski wrote:
You print something, it doesn't print out. How is it trivial to solve
this? If you happen to know that there's IO buffering and that there's
a function called flush() then maybe it trivial, but then there are the
other million users who don't. Hence the idea of setting is to implicit
flush for the masses, who not only don't know about the existence of
flush(), but also don't know why it's even necessary.
Ok. If we are argue about what is mass or not
Don't forget about
- millions(?) of _current_ PHP users who are used to implicit_flush=off by default.
- millions of decent programmers who are used to _usual_ behavior.
- millions of scripts/echo/print don't need automatic flush at all.
i.e. much fewer number of script/echo/print need auto flushing.
Please list programming languages (i.e. not shell) that do
automatic/inefficient/unneeded flushing by default in program mode.
If we are argue about difficulty of flushing,
- there are many tiny small things that may not be trivial to
newbies, flush may be one of them. They should learn these simple
idioms anyway.
- line buffering is easy enough to learn. Even newbies should find
it flushes with newline. It should be enough for them, if they
cannot find/learn flush().
- are we going to detect things that may not be intuitive to newbies?
e.g. infinite loop/recusion, etc. I guess not.
implicit_flush=On by default is bad for both newbies and experienced
users. Newbies (even experienced users) write inefficient programs, since
they don't know auto flushing. Experienced users have to unset auto
flushing almost always.
--
Yasuo Ohgaki
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php