On So, 2019-03-03 at 14:33 +0000, Rowan Collins wrote:
> On 02/03/2019 23:15, Steven Penny wrote:
> > 
> > > 
> > > > 
> > > > 4. introduce a new variable, perhaps
> > > > "$OUTPUT_RECORD_SEPARATOR", 
> > > > "$ORS", "$\"
> > > > or similar, that controls output record separator
> > > Such magic is hard to debug and easily leads to bugs in user
> > > code.
> > you post this without recognizing that Perl and Ruby already have
> > this 
> > for many
> > years. 
> 
> I think Johannes recognises that, but considers it a poor design
> choice 
> on the part of those languages.

In the context of those languages it might be an acceptable or even
good choice.

In context of PHP it means that each function, which prints anything to
the output stream eventually has to set or check that value as another
library might have set the flag in the "wrong" way.

Other languages might have a "per module" scope or something where this
could be set for a module, unaffected from other modules. PHP doesn't.

johannes


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to