That makes sense and it is one of the strengths of Julia. I made a habit of annotating methods unless they were deliberately type agnostic in my own code and was thrown by the documentation-only annotation because it seems less efficient to compile, but I see the value in assuming methods will be used responsibly for the sake of fast, flexible development.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| When should one type annotate a function signature? | 5 | 654 | June 11, 2024 | |
| Explicit type annotation in document for function in julia · JuliaLang/julia | 6 | 332 | July 27, 2023 | |
| Using code_typed to generate docstring templates | 7 | 186 | December 14, 2024 | |
| Type Inference | 6 | 441 | November 25, 2022 | |
| When a function requires a Vector that contains a concrete type, is it necessary to generate optimized code? | 16 | 1175 | October 31, 2021 |