Remix.run Logo
iLemming 3 days ago

Both CL and Elisp are arguably more functional than Javascript in several key ways - Immutable data by convention, First-class function from the start (js added this later), powerful higher-order function are more idiomatic, lexical closures, FP culture that goes back decades. JS has caught up in some aspects - arrow functions, array methods, const, libs like Rambda.

I think, Lisp in general is very flexible - you can write imperatively, or you can do more FP; if you need object-orientation - you have it, polymorphic dispatch - sure why not?, etc., etc.

xigoi 2 days ago | parent [-]

I object to the claim that a Lisp-2 has first-class functions.

iLemming 13 hours ago | parent [-]

What? Functions can be passed as arguments? Check! Returned from functions? Check! Stored in variables? Check! Lisp-2 just means functions and vars live in separate namespaces, that's all. In every other aspect they are first-class.

xigoi 7 hours ago | parent [-]

The separate namespaces mean that functions are considered as something fundamentally different from other values.