|
Posted by Jerry Stuckle on 11/15/05 19:09
Rich Kucera wrote:
> Why not? You never did this: $x = f1( f2( $y ) ); ?
>
> For example:
>
> $dir_path_component = array_pop( split('[/]',$dir) );
>
> This syntax seems second nature to me. It is now broken.
>
> You now have to inject a $foo variable into your syntax:
>
> $dir_path_component = array_pop( $foo = split('[/]',$dir) );
>
> Seems like other languages have solved whatever ill-effects result from
> passing of function results to another function.
>
> --
>
> http://groups.yahoo.com/group/heuristic/
>
Sure - but not if f1() takes a reference. It works fine if f1() takes a
value.
For instance, what is supposed to happen if you do something like:
function f1 (&$i) {
$i++;
}
Java and C++ handle this by not allowing a temporary to be passed as a
reference (compiler error) - which is correct operation, IMHO.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|