News for hackers. Stuff that matters.
Re:Python Best Practice Patterns by nine_k on Friday February 28, 2014 @03:30PM (#7321264)
`for (var i=0; i<l.length; i++)` is so 1970. In Javascript, you have array.map and $.each, and can define functions in-place.

Same applies to Python, BTW; get used to list comprehensions and generators and you cannot look back.

Re:Python Best Practice Patterns by pekk on Friday February 28, 2014 @03:54PM (#7321423)
These aren't supported everywhere in javascript.
Re:Python Best Practice Patterns by nine_k on Friday February 28, 2014 @04:36PM (#7321663)
jQuery or underscore provide them on every sane JS platform. These are not hard to write by hand, too.