-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
use * for pointer type instead of & #1032
Conversation
See #770 To help automatically translate code, see the zig-fmt-pointer-reform-2 branch. This will convert all & into *. Due to the syntax ambiguity (which is why we are making this change), even address-of & will turn into *, so you'll have to manually fix thes instances. You will be guaranteed to get compile errors for them - expected 'type', found 'foo'
Hm, I just realized that AppVeyor has not been running since the rename from zig-lang. Fixing now. |
All checks passed. I will merge this tomorrow morning. |
@Hejsil I'd be happy to deal with merging master into |
@andrewrk Sure thing. Idk if I got all redundant builtin removed, but I guess that can wait :) |
Ok, I pushed |
I think this can be fixed to actually use nullables now: |
This is part of Pointer Reform (See #770).
To help automatically translate code, see the
zig-fmt-pointer-reform-2
branch. It will convert all&
into*
. Due to the syntaxambiguity (which is why we are making this change),
even address-of
&
will turn into*
, so you'll haveto manually fix these instances. You will be guaranteed
to get compile errors for them -
expected 'type', found 'foo'
This fixes the cause of a lot of comptime bugs - the fact that
you could not have a pointer to a type (See #588)
This patch does not implement a new pointer type. It only changes the syntax and then fixes the bugs that were caused by the syntactic ambiguity. Further progress on Pointer Reform will happen gradually.