Y
Hacker News
new
|
ask
|
show
|
jobs
by
andrepd
1175 days ago
Why aren't they simply namespaced, like `core.some_function`?
2 comments
AnIdiotOnTheNet
1175 days ago
Because there'd need to be a magical exception for the "core" namespace that makes it not just a file of Zig code somewhere like every other module.
link
hiccuphippo
1175 days ago
Isn't there already a magical exception for "root" and "builtin"?
link
kristoff_it
1174 days ago
not really, those are two modules that are always available to you, but you still have to import them like any other Zig module `const builtin = @import("builtin");`
link
nine_k
1175 days ago
5 characters to type instead of 1.
link