Re: I hope this is the last email about this :) (was RF
| From: | Yasuo Ohgaki | Date: | Fri, 25 Oct 2002 23:22:08 +0000 |
| Subject: | Re: I hope this is the last email about this :) (was RF | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-90123@lists.php.net to get a copy of this message | ||
Derick Rethans wrote:
Yasuo, can you please stop this discussion now, it's not going to change. It only wastes time which we could have spend on numerous other things for PHP, such as fixing bugs and writing tests for the test system.I don't want to waste my time too. I just trying to make PHP a little better. Anyway, can you please stop patching without full knowledge or understanding issues? If you aren't certain, ask. Recent examples are: Makefile.global - You insisted it should be INI independent without fixing dependency issue main.c - You wrongly applied patch that enable without understanding the patch is bogus with the code. (I know you changed code more reasonable later, but it's still
not a good idea)It's a waste of time, since it just makes discussion harder. BTW, I think current output buffer code is not good enough. It's much better to write it with streams. Think about the implication of implicit flushing by default. -- Yasuo Ohgaki
On Fri, 25 Oct 2002, Yasuo Ohgaki wrote:Mike, It seems my last mail is a bit too negative. Sorry. Mike Ford wrote:-- ---------------------------------------------------------------------------I'm referring to actual shell used for user interface, such as bash, csh. AFAIK, all shells flushes automatically, but no programing language that is designed for programming do not flush.-----Original Message----- From: Yasuo Ohgaki [mailto:yohgaki@ohgaki.net] Sent: 24 October 2002 07:42 To: php-dev@lists.php.net; Alan Knowles Alan Knowles wrote:Add one more -- or even more, as I 'd say I'm +>1 for this!Im +1 for reverting the patch - (for what it's worth)This makes 2+ for having auto flushing :)BTW, real language (i.e. not shell) don't flush. Please let me know if there is real language that do automatic flushing by default.But PHP-CLI *is* a shell-scripting language, and therefore should behave like one. Other flavours of PHP aren't, and shouldn't. QED.If people would like to a script that can be used as filter, auto flushing is evil. If people writing interactive CUI programs, function prompt($prefix) { echo $prefix; flush(); } is enough. Line buffering is enough for all most all purposes. Don't forget auto flushing make system call flush stream twice with following script always. echo "abc\n"; And flushing is relatively heavy thing to do.In addition, is it too difficult to write this kind of code? function prompt($prefix) { echo $prefix; flush(); } I think this kind of code will be taught at the first class of programming course. (I could be wrong, since I don't know where people learned programming ;)At university: learned half-a-dozen languages; *all* of them flushed streams open on TTY either after every character, or (at line-end or when input requested from same device). I've been programming now for over 25 years, and this is *still* the behaviour I expect by default when programming command-line-executable scripts or programs.I think only very little CLI programs, less than 1%, a few % at most, need auto flushing. -- Yasuo Ohgaki -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.phpLet's guess something interesting. How much % of scripts actually needs automatic flushing? My guess is less than 1%. What is yours?For PHP-CLI: more than 90%. For PHP CGI or SAPI: much less than 1%.Derick Rethans http://derickrethans.nl/ JDI Media Solutions--------------[ if you hold a unix shell to your ear, do you hear the c? ]-