Closed bpavuk closed 1 month ago
This is recommended for modules whose only purpose is to expose the inner functionality to outside code. This mode forces some best practices for API design, like explicitly specifying visibility and types for public functions
Why API should be explicit?
Explicit visibility and return type specification will ease future efforts with documentation a lot. Due to type inference, documentation updates will require far more effort. IDE will update the types on itself if they ever change their name (like it was with TelegramMedia
-> TelegramFreeMedia
.
Also, this will make you think twice about the API design.
This is recommended for modules whose only purpose is to expose the inner functionality to outside code. This mode forces some best practices for API design, like explicitly specifying visibility and types for public functions