Skip to content

Conversation

@stevengj
Copy link
Member

@stevengj stevengj commented May 6, 2024

The performance tip from #43671 by @simeonschaub

If a global is known to always be of the same type, the type should be annotated.

was a bit unclear to me, because it does not apply to const globals (whose type requires no annotation). This PR clarifies that point

@stevengj stevengj added the docs This change adds or pertains to documentation label May 6, 2024
@StefanKarpinski StefanKarpinski merged commit 0d1d4ba into master May 6, 2024
@StefanKarpinski StefanKarpinski deleted the stevengj-patch-6 branch May 6, 2024 21:04
lazarusA pushed a commit to lazarusA/julia that referenced this pull request Jul 12, 2024
…uliaLang#54379)

The performance tip from JuliaLang#43671 by @simeonschaub 

> If a global is known to always be of the same type, [the type should
be
annotated](https://docs.julialang.org/en/v1/manual/variables-and-scoping/#man-typed-globals).

was a bit unclear to me, because it does not apply to `const` globals
(whose type requires no annotation). This PR clarifies that point
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