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

> I think that particular issue could be solved with tooling - if you can autocomplete from “package name” to a given exported identifier, you must already have a mapping from “package name” to “exported identifier” somewhere in your machine’s memory; duplicate this mapping and swap the keys for values, now “exported identifier” points to “package name” as well.

Sorry I don't follow. What the "from ..." syntax does (when typing it) is to narrow down 10k possibilities (the set of all exported functions in all in-scope modules) down to a few dozen. How would this be possible otherwise?

Illustration:

Case 1: import <just about anything is possible here - can't auto suggest>

Case 2: from fs import <only fs functions are in scope, start autosuggesting on keypress>



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

Search: