I’d love to see `@NoInfer` being standardized. Any...
# language-proposals
m
I’d love to see
@NoInfer
being standardized. Any plans on that? Often you have to provide something like
someDefinition<Type> {…}
or
resolve<Type> {…}
- where you define something for a specific type. For example: • In dependency injection I want to force an explicit type to be provided. It’s too easy to accidentally infer a wrong type (esp. after refactoring something) and it’ll only result in an error sometime at runtime. • BSON / GraphQL type definitions. Here I want to be explicit for safety. Also, definition blocks can become quite long and if you have many across your project figuring out the type takes a while because it’s implicit. Last but not least type inferences seems to slow down compiler and IDE performance significantly.
👍 1
j
We would definitely use this for Zipline. It's basically the DI case but with dependencies into and out of a VM instead of a simple object graph.
Is there a YouTrack I can 👍?
m