Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are you? What would an option for a hash set of userids? I just don't find that "types" magically solve problems of cognitive load.


> What would an option for a hash set of userids?

As an argument: An optional filter for a query e.g. "return me posts form these users"

As a return value: The users who liked a post or nothing if it's not semantically valid for the post to be liked for some reason.

> I just don't find that "types" magically solve problems of cognitive load.

Cognitive load is about working memory and having to keep things in it. Without types one only has a name, say "userIds". The fact that it's possible for it to be null and that it's supposed to contain unique values has to be kept in working memory(an increase in cognitive load)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: