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

add basic overview of when to use type declarations #39812

Merged
merged 8 commits into from
Feb 25, 2021

Conversation

stevengj
Copy link
Member

Questions about when to declare function arguments come up over and over on discourse, and so it seems useful to put a basic summary early in the chapter on Functions, rather than deferring it to later chapters.

@stevengj stevengj added the docs This change adds or pertains to documentation label Feb 24, 2021
Copy link
Member

@timholy timholy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems helpful and in the right place. There are other reasons to add types, but these are the most common and most relevant for newcomers.

@timholy
Copy link
Member

timholy commented Feb 24, 2021

Maybe slightly less emphasis, though? Feels a bit like shouting, though I understand why these points are worth emphasizing.

@stevengj
Copy link
Member Author

stevengj commented Feb 24, 2021

With regard to bold/emphasized text, I was influenced a lot by Jakob Nielsen's usability studies, which suggests that online readers typically scan text rather than reading from top to bottom, and so it is useful to highlight key ideas in bold to aid scannability.

However, I can certainly cut down on this if people prefer; I've already updated it to trim the emphases somewhat. Let me know if you want me to go further.

@JeffBezanson JeffBezanson merged commit 936e84f into master Feb 25, 2021
@JeffBezanson JeffBezanson deleted the stevengj-patch-6 branch February 25, 2021 22:37
@JeffBezanson
Copy link
Member

Nice!

ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
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

Successfully merging this pull request may close these issues.

4 participants