Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture the ambient discussion and thinking about bi-directional type information flow in a principle #4130

Open
chandlerc opened this issue Jul 13, 2024 · 1 comment
Labels
long term Issues expected to take over 90 days to resolve.

Comments

@chandlerc
Copy link
Contributor

chandlerc commented Jul 13, 2024

Several design discussions in Carbon have talked about "what direction does type information flow" in the context of type inference. Broadly, these discussions have seemed to advocate away from bi-directional type information flow.

More specifically, they have advocated away from "inwards" flow such as the context using the result of a call expression (as opposed to the arguments) influencing overload selection: https://github.com/carbon-language/carbon-lang/blob/trunk/proposals/p2875.md#overloaded-call-operator

Also more specifically, they have moved us away from a Hindley–Milner type system design for expression types, etc.

We should capture the underlying idea that informs these discussions as best we can and write it into a principle document that can be referenced. A nice property of such a principle is it can be relatively brief and doesn't need to be precise or exacting, but can still help indicate the directionality of Carbon's design in this space.

@chandlerc chandlerc added the long term Issues expected to take over 90 days to resolve. label Jul 13, 2024
@chandlerc
Copy link
Contributor Author

(marked as long-term because this isn't urgent at all, mostly filing the issue to not lose track of it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
long term Issues expected to take over 90 days to resolve.
Projects
None yet
Development

No branches or pull requests

1 participant