Marc Knaup
10/16/2022, 11:03 AM@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.jw
10/16/2022, 2:46 PMjw
10/16/2022, 2:47 PMMarc Knaup
10/16/2022, 2:48 PM