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 type annotations to global declaration? #7214

Closed
RichMorin opened this issue Jun 11, 2014 · 1 comment
Closed

add type annotations to global declaration? #7214

RichMorin opened this issue Jun 11, 2014 · 1 comment

Comments

@RichMorin
Copy link
Contributor

The latest Performance Tips document

http://julia.readthedocs.org/en/latest/manual/performance-tips/

says that "Uses of non-constant globals can be optimized by annotating their types at the point of use:". However, this can become tedious.

How about allowing a single type annotation in the global declaration to cover all uses in the function, eg:

global a, b::Int, c

@StefanKarpinski
Copy link
Member

Dup of #964 – in short, it's a planned feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants