rfc:currying

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
rfc:currying [2011/06/07 11:49] – More on error handling lstrojnyrfc:currying [2011/06/07 11:51] – formatting lstrojny
Line 137: Line 137:
 </code> </code>
  
-== Pitfalls == +=== Pitfalls and criticism === 
-There are a few concerns to implement it that way =+== Performance ==
 How is performance affected because of the heavy use of Closure objects? I don’t know yet, any guesses? How is performance affected because of the heavy use of Closure objects? I don’t know yet, any guesses?
  
-= Error Handling =+== Error Handling ==
 Error messages could be misleading. E.g. not passing an argument to ''$func()'' would result in a warning for a missing argument when calling ''$func()'' without any mention of ''strpos()''. One way to overcome this problem would be to have ''class CurriedFunction extends Closure''. This subclass would contain additional properties for a nicer the error message. It would even be possible to override error handling for ''CurriedFunction::__invoke()'' to make it more specific. Error messages could be misleading. E.g. not passing an argument to ''$func()'' would result in a warning for a missing argument when calling ''$func()'' without any mention of ''strpos()''. One way to overcome this problem would be to have ''class CurriedFunction extends Closure''. This subclass would contain additional properties for a nicer the error message. It would even be possible to override error handling for ''CurriedFunction::__invoke()'' to make it more specific.
  
rfc/currying.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1