Comment

Comment by cbrogrammer

> const createUser = (

> attributes: UserAttributes,

> onCreate: (user: User) => void

> ): User => {

> user = User.create(attributes);

> onCreate(user);

This stood out to me, in an otherwise tame article, as probably the most terrible overthought interface possible. A literal callback function passed as a function reference to something that does three lines of code? Good luck with that, I much prefer even a slightly procedual implementation.

parent cbrogrammer 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton