Comment

Comment by christophilus

> how do you know which members of the struct really need to be populated

Interfaces + duck typing? Your function shouldn’t ask for the struct, but rather for an interface describing what it needs.

Practically, though, I often just ask for the struct because I’m a slob.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton