[glotpress-updates] [GlotPress] #305: Deprecate lambda, and switch to using anonymous functions instead.

GlotPress noreply at wordpress.org
Sun Nov 23 22:40:08 UTC 2014


#305: Deprecate lambda, and switch to using anonymous functions instead.
--------------------------+-----------------------
  Reporter:  yoavf        |      Owner:
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  1.0
 Component:  performance  |    Version:
Resolution:               |   Keywords:  has-patch
--------------------------+-----------------------

Comment (by pento):

 I have no strong opinions either way on switching to anonymous functions.
 If we do, however, I would like us to be consistent.

 [attachment:305.diff] needs a little bit of whitespace attention (ie,
 `function( $m ){` should be `function ( $m ) {`).

 It's probably worth thinking about coding standards for when core moves to
 5.3+ - should anonymous functions generally be inline to the function
 they're being passed to, or should they be assigned to a local variable,
 first? [attachment:305.diff] uses both methods.

 Finally, I'm strongly against ''ever'' using anonymous functions against
 actions or filters, as an unremovable action or filter is bad practice.

--
Ticket URL: <https://glotpress.trac.wordpress.org/ticket/305#comment:5>
GlotPress <https://glotpress.trac.wordpress.org>
Easy comin', easy goin'


More information about the glotpress-updates mailing list