ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
arBmind1 has joined #zig
arBmind has quit [Ping timeout: 248 seconds]
tyler569 has joined #zig
<GitHub94>
[zig] MasonRemaley opened pull request #628: Implements translation for the prefix not operator (master...translate-c-prefix-not) https://git.io/vbfrr
<andrewrk>
we're going to add labeled blocks, labeled loops, labeled break, labeled continue, labeled return (from a block), and remove goto
cenomla has joined #zig
jjido has joined #zig
<jjido>
Hello
<andrewrk>
hi jjido
<jjido>
What are the capabilities of zig's goto? Is it limited to 256 local labels like gcc?
<andrewrk>
the only limitation is that you cannot jump over variable declarations or defer statements
<andrewrk>
however there is an accepted proposal to do the following:
<andrewrk>
add labeled blocks, labeled loops, labeled break, labeled continue, labeled return (from a block), and remove goto
<andrewrk>
anything you can do with goto, you can do with the above features
<andrewrk>
if you have a counter example, that would be most welcome
<jjido>
Well I can still use older version of zig if that happens
<jjido>
Don't know if it is a good counter example
<andrewrk>
jjido, you are of course welcome to do that, however if you do it implies that you view the older version as better somehow, and I would find it valuable to understand why
<jjido>
I am looking for a target to compile to
<andrewrk>
I see
<andrewrk>
so you want something like a basic b lock
<jjido>
And assembly looks like a too high hurdle for me
<jjido>
Llvm has no usable goto as well
<jjido>
My language is continuation based
<andrewrk>
have you looked at LLVM's coroutine support?
<andrewrk>
but status quo is we have labels and goto
<andrewrk>
jjido, I always welcome another zig user, but in the interest of actually helping you solve your problem, if you're writing a language you probably want to target LLVM and not zig
<jjido>
I will do it the way I like. The goto probably makes zig a better target
<jjido>
With llvm I need to use trampolining which I consider a big waste