Hacker News new | ask | show | jobs
by whatever1 806 days ago
I think a neat ide feature would be to auto hide all the types and only show them as a pop up tooltip or something similar.

This way you can read the code more easily and if you want to see the type it's there for you.

2 comments

From what I can tell most functional programming tooling has this feature, but in the inverted manner from what you're describing for a language with explicit typing. You can hide the inferred type annotations but then have a key chord for showing them. I tend to just leave the annotations visible.
This is available for Rust. It might be for other languages. You can show the types as hints in the editor, or you can hover the variables to see the types. The latter is available for many languages, including Python and Go.