Hacker News new | ask | show | jobs
by valbaca 1456 days ago
Whether to pass in a single dict/object/map/assoc-list or individually separated arguments is a tale as old as LISP (JS has some FP roots if you squint hard enough) and most LISPs (and JS has started doing this as well) mitigates this with destructuring:

Common Lisp: https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node252.html

Clojure: http://blog.jayfields.com/2010/07/clojure-destructuring.html

JS: https://simonsmith.io/destructuring-objects-as-function-para...