Hacker News new | ask | show | jobs
by zbanks 5732 days ago
Haskell, but not programming in it.

Haskell really drilled in the concept of functional programming. As much as I struggle to write 'normal' code in it, the computational aspects are really fun to write.

However, after a while, I began to incorporate functional programming concepts into other languages, notably python & javascript.

Python already has functional elements built-in, such as map, reduce, filter, lambdas and list comprehensions. Its cool to replace for loops with long "one-liners"; it creates a different perspective of a list.

Javascript, on the other hand, is less blessed than python. Closures do help, however. Although JS 1.6 & beyond support Array.map, folds, and filters, it's hard to rely on them. After writing my own libraries enough times, I started using ( http://documentcloud.github.com/underscore/ ) Underscore.js, if not JQuery, in every project. By its very nature, looping over DOM elements lends itself very very well to functional style programming.