Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please rewrite a sentence about types in the manual #23967

Closed
StephenVavasis opened this issue Oct 2, 2017 · 2 comments
Closed

please rewrite a sentence about types in the manual #23967

StephenVavasis opened this issue Oct 2, 2017 · 2 comments
Labels
docs This change adds or pertains to documentation

Comments

@StephenVavasis
Copy link
Contributor

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.

@stevengj stevengj added the docs This change adds or pertains to documentation label Oct 2, 2017
@StephenVavasis
Copy link
Contributor Author

Nobody responded to this issue, so I rewrote the offending paragraph myself and have submitted a PR:
#26312

@StefanKarpinski
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

3 participants