Skip to content

Comment on Show HN: Using Common Lisp from Inside the Browserparent

Comments

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.

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

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.

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

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.