Skip to content

Comment on The Invention of the Function Keyword

Comments

Now why do people use const lambdas when there is a perfectly fine function keyword?

Because the hoisting of functions introduces mutable variables. The rule for variables is that everything should be const unless it is meant to be reassigned and then you use let.

AboutSource Built by g1lg1l

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