News for hackers. Stuff that matters.
Re:Koa – Next-generation web framework for Node.js by tjholowaychuk on Thursday December 19, 2013 @06:22PM (#6938731)
haha I've grown to prefer it, sort of like regular conditionals vs postfix conditionals, you set up the expectation first:

if (user.isAuthenticated) doSomething()

vs

doSomething() if (user.isAuthenticated)

the first is less readable perhaps but I think it's more useful for a programmer. To each their own! Maybe some day I'll be convinced otherwise, I like it better for asserts too:

assert(200 = res.statusCode) assert('application/json' == res.headers['content-type'])

assert(res.headers['content-type'] == 'application/json')

looks weird to me now but maybe I'm just used to it

There are no comments on this comment yet.