You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm impressed by how little people use the 'use' keyword
I'm guessing that's due to lack of docs and examples, which isn't entirely unintentional. (Although of course nearer to zig's completion it will not be a valid strategy)
Is it better to prepend every SDL_* function with 'c.' or 'sdl.'?
One thing I'll point out is that the common prefix on C functions is essentially a namespace, even though it's part of the symbol name. E.g. SDL_CreateTexture and SDL.CreateTexture are equivalent in meaning and in number of characters, but the second example uses an actual namespace.
One more thing, you can see for the LLVM functions that the self hosted compiler uses, I did this:
I can't remember if I opened a proposal for doing something like this automatically or not, but there should at least be a proposal.
I take compilation time very seriously.
Me too. That's the reason for opening #1535, and you can see in the self-hosted compiler I'm going to great lengths to fully utilize all the cores of a machine, cache as much as possible (in memory!), and take advantage of language semantics in order to divide up compilation into independent work units.
I think as that work comes to fruition we can re-evaluate use and the evolution of the feature.
I had no idea 'use' existed and also have no clue what it actually does and
why it would be related to compile speeds.
So that's the main reason I'm not using it and that probably goes for
others as well.
Op do 27 sep. 2018 05:24 schreef Andrew Kelley <[email protected]>:
I'm impressed by how little people use the 'use' keyword
I'm guessing that's due to lack of docs and examples, which isn't entirely
unintentional. (Although of course nearer to zig's completion it will not
be a valid strategy)
Is it better to prepend every SDL_* function with 'c.' or 'sdl.'?
One thing I'll point out is that the common prefix on C functions is
essentially a namespace, even though it's part of the symbol name. E.g.
SDL_CreateTexture and SDL.CreateTexture are equivalent in meaning and in
number of characters, but the second example uses an actual namespace.
One more thing, you can see for the LLVM functions that the self hosted
compiler uses, I did this:
https://github.com/ziglang/zig/blob/1c26c2f4d5c9029fe39cc413f75e547636e42a14/src-self-hosted/llvm.zig#L26-L104
I can't remember if I opened a proposal for doing something like this
automatically or not, but there should at least be a proposal.
I take compilation time very seriously.
Me too. That's the reason for opening #1535
<#1535>, and you can see in the
self-hosted compiler I'm going to great lengths to fully utilize all the
cores of a machine, cache as much as possible (in memory!), and take
advantage of language semantics in order to divide up compilation into
independent work units.
I think as that work comes to fruition we can re-evaluate use and the
evolution of the feature.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1589 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AL-sGoC9pBYkGVZPG9EBA8Np1eVu0mBKks5ufETygaJpZM4W5QIJ>
.
Activity
tiehuis commentedon Sep 27, 2018
@UniqueID1 see also #1047.
andrewrk commentedon Sep 27, 2018
I'm guessing that's due to lack of docs and examples, which isn't entirely unintentional. (Although of course nearer to zig's completion it will not be a valid strategy)
One thing I'll point out is that the common prefix on C functions is essentially a namespace, even though it's part of the symbol name. E.g.
SDL_CreateTextureandSDL.CreateTextureare equivalent in meaning and in number of characters, but the second example uses an actual namespace.One more thing, you can see for the LLVM functions that the self hosted compiler uses, I did this:
zig/src-self-hosted/llvm.zig
Lines 26 to 104 in 1c26c2f
I can't remember if I opened a proposal for doing something like this automatically or not, but there should at least be a proposal.
Me too. That's the reason for opening #1535, and you can see in the self-hosted compiler I'm going to great lengths to fully utilize all the cores of a machine, cache as much as possible (in memory!), and take advantage of language semantics in order to divide up compilation into independent work units.
I think as that work comes to fruition we can re-evaluate
useand the evolution of the feature.BarabasGitHub commentedon Sep 27, 2018
[-]add docs for use[/-][+]add docs for usingnamespace[/+]