rfc:callable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

rfc:callable [2011/06/07 13:53]
bjori created
rfc:callable [2017/09/22 13:28]
Line 1: Line 1:
-====== Request for Comments: How to write RFCs ====== 
-  * Version: 1.0 
-  * Date: 2011-06-07 
-  * Author: Hannes Magnusson <bjori@php.net> 
-  * Status: Under Discussion 
-  * First Published at: http://wiki.php.net/rfc/callable 
- 
- 
-===== The problem ===== 
- 
- 
-Frameworks have started to adopt Closures for callbacks, utilizing the 'Closure' typehint. 
-That has an unfortunate sideeffect of requiring already-existing-methods to be wrapped into a closure calling that method. 
- 
-===== The solution ===== 
- 
-Introducing a callable typehint. 
- 
-The typehint would allow a string with a function name, an array composed of classname/obj+methodname, and a closure. 
- 
- 
-===== Patch ===== 
- 
-  * http://php.markmail.org/download.xqy?id=ya3f6abxw2u6asdp&number=1 
- 
-===== Previous discussions ===== 
- 
-  * http://php.markmail.org/message/gdas65h3im52sleg 
-  * http://php.markmail.org/message/ya3f6abxw2u6asdp 
- 
-== Discussion summary == 
- 
- 
-  * The only arguments against the idea came from Stas, [[http://php.markmail.org/message/hhdjdfo3o34mcj2t?q=callable|making the argument]]; 
-    * 'callable' are nothing different then 'balanced binary tree' and 'readable file', and none of them make sense to have typehints for. 
-    * A "strict typing error" is hard to handle in user-space gracefully 
-  * Everyone else seem to like the idea. 
-  * As for the patch itself, Felipe pointed out that the patch is missing an method in ext/reflection to retrieve the typehint information. 
- 
- 
-===== Changelog ===== 
- 
-  * June 7th 2011, Initial writeup 
  
rfc/callable.txt · Last modified: 2017/09/22 13:28 (external edit)