Skip to content

Comment on Comment your damn codeparent

Comments

I wasn't actually trying to make a statement about type systems. To translate my example to python:

    def getFileHandleOrNone(filename, config):
        ...

    def foo(filename, config):
        """get file handle or none, 
           based on context and filesystem"""
You are correct that the type system also provides documentation, but so does giving your methods a name indicating what you want them to do.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.