Skip to content

please rewrite a sentence about types in the manual #23967

@StephenVavasis

Description

@StephenVavasis

The following sentence appears at the end of the 3rd paragraph of the chapter called "Types" in the manual. When I read it several years ago as a Julia newbie, I misunderstood what it meant and got a wrong impression of how types work:

"Doing so [gradually introducing type annotations] will typically increase both the performance and robustness of these systems, and perhaps somewhat counterintuitively, often significantly simplify them."

I mistakenly thought that this sentence meant that the myplus example (appearing later in the section, but was not in the manual when I first read it) would be more efficient if both x and y were explicitly typed.

Now that I am more experienced, I still don't know what the above sentence means, but it is still a high-visibility sentence for newbies. AFAIK, the main reasons to introduce type annotations in function specifications are: (1) to guide the multiple dispatch, (2) to catch programmer errors, (3) to improve human readability. None of these three directly relates to performance, robustness or simplicity. So I would like to suggest that the original author rewrite the sentence or else delete it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsThis change adds or pertains to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions