Hacker News new | ask | show | jobs
by squirtlebonflow 1067 days ago
How is it natural to write code like that?

If it's None, don't put it in the cache. If T is None, don't put it in the cache.

if (typeof input != None) putInCache(input)

1 comments

> If it's None, don't put it in the cache. If T is None, don't put it in the cache.

> if (typeof input != None) putInCache(input)

Exactly, now you've just written exactly the bug I was talking about.