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)
- ReleaseSafe panic error trace points at line 0 when freeing an undefined pointer HOT 4
- Zig does not report errors or sliently fails on `.S` / `assembler_with_cpp` files HOT 1
- Can't link on PPC64LE HOT 1
- ErrorUnion typeInfo debug print causes GenericPoison HOT 3
- Support `wasm32-emscripten` libc HOT 1
- Unsure how to handle duplicate symbol linker error
- SIGTRAP When attempting to write to a runtime index in comptime variable HOT 1
- Undefined struct fields are initialized to 0 instead of 0xAA in debug mode (with llvm backend)
- zig fetch -h should include examples
- std.Build.Cache.addDepFilePost should report the missing path when error.FileNotFound is encountered
- implement std.Progress for single-threaded mode
- std.Progress: add byte unit flag and resource scope; support throughput calculation HOT 1
- implement std.Progress IPC for WASI
- implement std.Progress IPC for Windows
- add support for targeting glibc 2.39
- Progress display is cut off horizontally HOT 2
- `zig fmt` outputs invalid syntax when formatting an error set with doc comments onto one line
- Latest master tarball is unable to build a stage4 zig HOT 3
- upperBound and lowerBound has inconsistent callback types HOT 1
- "offsetof" from C header does not handle union within struct HOT 3
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.