Comments (4)
use "a.zig";
This would import everything into the global namespace.
use "a.zig" as a;
To use a.zig symbols with this style, use a::symbol
.
from zig.
How about this instead for an explicit namespace:
use a = "a.zig";
That looks more like you're creating a symbol and initializing it. The as
syntax you proposed is borrowed from python, which also uses that syntax for its with
syntax. But for zig, as
is used for type casting, so it doesn't seem appropriate in this context.
from zig.
I like that. It's more consistent with typedef syntax.
type foo = other;
from zig.
use
was from when I thought to borrow rust syntax. Given the new syntax proposal, how about renaming use
to import
?
from zig.
Related Issues (20)
- `zig cc` and `zig c++` do not use stdout with `-o -` arguments
- std.debug.StackIterator in embedded throws compile error for ucontext_t being missing in std.posix.system HOT 1
- HelloWorld binary size increased a lot in recent Zig versions
- build: panic when passing invalid path to tracy
- reader.readAllAlloc crash on Ampere a1 CPU when given a much larger max_size parameter than the actual file size
- Transitive lazy dependencies are not fetched
- build --watch panics on debian linux (name_to_handle_at returns .INVAL)
- `stack_check = false` is ignored
- `ChaCha20With64BitNonce.stream` uses wrong type for `counter` parameter HOT 1
- coercion of mutable pointers' child type causes a soundness issue HOT 1
- `zig cc -E -dM` with `-target` argument should not produce an output file HOT 1
- `std.os.linux.AUDIT.ARCH` needs to be rewritten
- Segmentation Fault when compiling std.mem.swap of anonymous tuple HOT 1
- std.fs.test `file operations on directories` fails with Wasmtime 23.0.1 HOT 7
- Wrong Error Message for coercing an anonymous tuple to a struct HOT 1
- autodoc: Inline code spans in doc comments do not preserve whitespace
- Zig fmt doesn't align vertically on trailing comma HOT 1
- Segfault using anonymous tuple struct HOT 4
- Sema unreachable on `runtime_store` at comptime
- Conversion functions to/from ELF/COFF machine types need rethinking
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zig.