Hacker News new | ask | show | jobs
by michaelmior 5000 days ago
This could be solved if annotations were supported syntax. This works well in other languages (e.g. decorators in Python and annotations in Java)
2 comments

And before annotations were added in java, the exact same hack was used for annotations. The alternative was to have separate configuration and mapping files which was painful. And then, you had libraries which did not have in-comment annotations and intermediate ones which compiled in-comment annotations to the original libraries's mapping files. Oh the fun we had.
(Python 3 has function argument and return annotations too)

I've made a static type checker for Python...

https://github.com/williame/obiwan