-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
acceptedThis proposal is planned.This proposal is planned.breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
Related:
- instead of
runsubcommand, treat first positional argument as the zig run target #1505 - zig fmt does not handle shebang lines #1546
Currently the tokenizer allows and skips over a shebang (e.g. #!/usr/bin/env zig) at the start of a source file. This feature is not documented nor is it part of the grammar.
I think the language should either explicitly support this feature or not support it at all. Right now it's kind of in a hazy middle ground.
Pros:
- Removes logic from tokenizer, formatter, and any syntax highlighters
- Acting sooner means nobody will come to depend on the feature
Cons:
- There may be a legitimate use case for the feature — I'd love to get some input from others on this
Counterarguments:
- It could be argued that this is a feature of the compiler implementation and not the language itself. But if the language docs specify source file encoding then I'm inclined to believe this is in scope as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.