Re: Code References
| From: | Sterling Hughes | Date: | Mon, 19 May 2003 16:24:05 +0000 |
| Subject: | Re: Code References | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-1730@lists.php.net to get a copy of this message | ||
On Mon, 2003-05-19 at 13:48, Andi Gutmans wrote:
> At 10:42 AM 5/19/2003 -0400, Sterling Hughes wrote:
> >Well, right. As I've mentioned beforehand, speed is really a secondary
> >factor, although it does exist, and the concept of code references
> >(passing around function pointers as opposed to function names) would
> >make php faster anywhere callbacks are used.
> >
> >But its also a cleanliness and ease-of-use factor. If you look at the
> >amount create_function() is used in PHP code, its next to nil. With
> >other scripting languages such features are commonly used (and very
> >*useful* imho). One could assume this is because PHP users don't need
> >it, but I think its more due to the way its kludged in (imho again). I
> >think a clear way of having function pointers, and then a nice syntax
> >for declaring anonymous subroutines (read: I don't want to stash my code
> >inside a variable), would be something really useful.
>
> I must agree with the opposition about the introduction of 'code references'.
> Personally, I don't think code which makes extensive use of code references
> is very readable in general so saying that create_function() is ugly is
> interesting :)
> Anyway, I think create_function() is there, it works, and I don't see a
> convincing reason for something slightly different.
>
Well, you're all wrong. But your collective wrongness has convinced me
to drop it :)
-Sterling
> Andi
--
"The three most dangerous things in the world are a programmer
with a soldering iron, a hardware type with a program patch and
a user with an idea."
- Unknown