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

Fully typing variadicity in Python is only possible with dependent typing, since Python allows you to build the argument list dynamically. Generally speaking you can't even determine the number of arguments statically:

    args = []
    while some_condition():
        args.append('x')
    f(*args)
Typed Racket allows you type some common cases, though.



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: