|
Posted by Razzbar on 04/27/07 16:17
On Apr 24, 2:29 pm, Michael Placentra II <sumguyovrt...@gmail.com>
wrote:
> I think I like Oliver Grätz's method better. Whether or not I'm using parameters at the moment of writing the function, I'd still like to have the functionality over my shoulder. It can be used in the same way, anyway.
It's definitely the more flexible of the two. Only it uses constructs
I'm not familiar with. Yet.
The thing that doesn't seem right to me is that you can't have it work
by passing a reference
to the function:
function buffer(&$func){
....
}
This is usually done to change the value of a variable within a
function, rather than
simply using the value locally. But the idea is that instead of the
parameter being
evaluated in the calling sequence, the function would only recieve a
pointer to the
function, and work within.
It's been a long time since I worked with C or Pascal, but I believe
that when you
pass them a pointer to an object, the object is not automatically
evaluated.
Which to me, is the more logical way of treating function parameters.
[Back to original message]
|