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

It doesn't have to be 9+ separate arguments, in some languages it can be a single 'context' or 'env' object that contains just what the handler needs, something like `handleHello({ db, cache, blobStore, authz }, req, res)`. That way, if two handlers use the exact same context you can reuse, but it's also easy enough to declare a per-handler context at the call site.


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

Search: