At 08:02 30/10/2004, Ilia Alshanetsky wrote:
Derick Rethans wrote:
- Adding new language constructs in mini releases is IMO not the way to
  go as it will make it possible impossible to run script that use this
  new construct not even parse on PHP 5.0.x servers. Adding normal new
  functions does not have this problem of course, as those scripts are
  still parsable.

IMO a mini release is a Z.X.Y not a Z.X release. The 5.1 release in particular introduces far more reaching changes already then this minor feature I am suggesting.


- Substring works just fine, adding this for performance reasons is IMO
  invalid.

I presume you have some benchmarks to prove this, I'd very much like to see those.

His point (I believe) is that introducing this patch for performance reasons, regardless of whether it makes a big difference or not, is invalid. He's not saying that it won't improve performance - he's saying that adding this with performance being the key reason is wrong. As in the past, I very much agree with this principle. Performance should play little if any role in our decision to add language-level operators.


I have no strong opinion either way about this syntax addition in particular, but I lean in favour of adding it. I think it's a nice-to-have, that might actually be useful by clarifying code, rather than (by just) speeding it up. One advantage that this syntax has over other suggestions we've seen in the past is that it is quite easy to figure out what it does (either by guessing or checking), and once established, can actually result in more readable code.

Zeev

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



Reply via email to