News for hackers. Stuff that matters.
Re:New-less JavaScript (2013) by zimbatm on Thursday March 12, 2015 @04:56AM (#9189671)
The best reason to have new-less constructors is because it's now possible to use them as higher-order functions.

    [1,2,3].map(User)
Re:New-less JavaScript (2013) by insin on Thursday March 12, 2015 @05:17AM (#9189728)
As long as the constructor doesn't take multiple arguments [1], otherwise:

    [1, 2, 3].map(id => User(id))
[1] http://speakingjs.com/es5/ch15.html#_pitfall_unexpected_opti...
Re:New-less JavaScript (2013) by elclanrs on Thursday March 12, 2015 @05:50AM (#9189828)
I find it useful to have `unary` and `apply` around:

  [1,2,3].map(unary(User))
  [[1,2],[3,4],[5,6]].map(apply(User))
Re:New-less JavaScript (2013) by zimbatm on Thursday March 12, 2015 @05:37AM (#9189793)
Why JavaScript, why !
Re:New-less JavaScript (2013) by drinchev on Thursday March 12, 2015 @05:06AM (#9189688)
Or the alternative :

    [1,2,3].map( function(i) { return new User(i); } );
might seem more reasonable in the JS world.
Re:New-less JavaScript (2013) by agumonkey on Thursday March 12, 2015 @11:42PM (#9195561)
It's a valuable but unnecessary intermediate step if you go into functional idioms (map, fold, closures) fully.

raganwald books cover this way of using javascript https://leanpub.com/u/raganwald