Comment

Comment by seasonalgrit

If you're going to go with a functional approach (which he introduces in the section "How to avoid 'this'"), instead of creating a brand-new function for each particular piece of data (e.g., setName, setGreeting) -- which will result in a ton of extra code -- just use a simple, generic assoc function.

"Inventing a class with its own interface to hold a piece of information is like inventing a new language to write every short story." -- Rich Hickey

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton