2012/9/19 Steve Clay <st...@mrclay.org> > Hello, > > https://wiki.php.net/rfc/**alternative_callback_syntax<https://wiki.php.net/rfc/alternative_callback_syntax>is > a proposal for a simple alternative syntax for creating function > callbacks. > > The basics: Given a function/method call, replace the argument list with > "::function". PHP would evaluate this as a callback for the > function/method, fully resolving any class/function names according to the > current namespace and any use statements. > > In my opinion this syntax would aid readability and benefit users via > fewer typos and namespace errors, and via (hopefully) better IDE support. > > > I welcome any feedback. I don't have adequate C skills to offer a patch at > the moment, but I generally read everything I can get my hands on about how > PHP features are implemented and am not afraid to jump in. > > Thanks for your time. > > P.S. I've kicked around this idea around for awhile, but Ralph Schindler's > idea for using ::keyword provided a better path to BC, and more > attractive/meaningful syntax. > > P.P.S. I'm unaware if it's customary to throttle the release of RFCs, so I > apologize for hogging any attention away from those under discussion. > > Steve Clay
Hi, Beside that I like the idea to get rid of defining callbacks as string (for the same reason I like 'Classname::class' for classes) I don't like, that functions will look like classes with a static property "function" then ... Regards, Sebastian > > -- > http://www.mrclay.org/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- github.com/KingCrunch