Strongly type the code (avoid using any as a type) #2785
Labels
ToTriage
type:infrastructure
Core back-end work which includes quality work, code refactor, tests etc
Is your feature request related to a problem? Please describe.
I am proposing to strongly type all parts of the code and especially avoid using any as a type. This would be a valuable improvement as it will bring the following benefits:
Increased robustness: Strong typing can help to prevent errors caused by type mismatches. This is because the compiler will be able to catch errors at compile time, rather than runtime.
Easier to maintain: Strong typing can make the code easier to maintain by making it easier to understand and reason about. This is because the types of the variables and expressions are explicit, rather than implicit.
Improved readability: Strong typing can improve the readability of the code by making it easier to see the types of the variables and expressions. This is because the types are not inferred by the compiler, but are explicitly specified by the programmer.
No type ambiguity: The use of any as a type can lead to type ambiguity, which can make the code more difficult to understand and maintain.
Improved code safety: Avoiding the use of any as a type can help to improve the code safety by making it more difficult to introduce errors into the code.
Add rule to make typing as any a warning #2887
Incrementally replace any types with strong types #2888
The text was updated successfully, but these errors were encountered: