Prep: Golang Comptime

(github.com)

41 points | by Seb-C 2 days ago ago

4 comments

  • Groxx 15 minutes ago ago

    TIL `go build -toolexec`. That... seems like it'd enable a lot of interesting shenanigans...

    I'm somewhat surprised by how little I see online about it.

  • andyferris 2 hours ago ago

    The cool thing that zig comptime does is that it interacts with the type system. This seems geared around computations, more than e.g. defining structs.

  • pa7ch 2 hours ago ago

    I wonder what Go would look like if it had generics removed but something like comptime added.

    • fjasdddwsfasd 15 minutes ago ago

      I always felt like if and when Go chose to implement Generics it would be like what Zig did today.