News for hackers. Stuff that matters.
Re:Zig Quirks by andrepd on Monday March 27, 2023 @06:48AM (#35325043)
Why aren't they simply namespaced, like `core.some_function`?
Re:Zig Quirks by AnIdiotOnTheNet on Monday March 27, 2023 @07:30AM (#35325314)
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.
Re:Zig Quirks by hiccuphippo on Monday March 27, 2023 @09:24AM (#35326385)
Isn't there already a magical exception for "root" and "builtin"?
Re:Zig Quirks by kristoff_it on Monday March 27, 2023 @10:00AM (#35326759)
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");`
Re:Zig Quirks by nine_k on Monday March 27, 2023 @09:18AM (#35326329)
5 characters to type instead of 1.