Context-aware imports

Context-aware imports

Look at this code:

import { Person } from "Contacts"

const RegistrationForm = <Form inputs={<><Person></>} />

And compare it with this code:

import { Person } from "Contacts"

const Registrations = <List filters={<><Person /></>} />

This does not work now. Because we have nothing to enable us to distinguish between those two imports. We don't have Context-Aware Imports.

So, what should we do? Right now we should add Filed and Filter to the end of those imports. But that makes our code less human-like and more artificial.

I believe that to create more expressive code, with less boilerplate and better semantics and abstractions, we should be able to enjoy context-aware imports in the future.