1. 11
  1.  

  2. 3

    one thing I really want to see happen but I can’t totally justify working on is a Go to C compiler that just uses 1:1 threads for goroutines and a conservative GC.

    1. 2

      Why would you want to make that happen? Not saying it’s necessarily a terrible idea, but I’m also not sure what the big use case is over Cgo or Nim or the like?

      1. 1

        I have a project I’m working on that bootstraps from C but is written in go, so i think it might be a good bootstrap path. mainly. Nim also generates small binaries, which maybe would be cool for go.

      2. 1

        You can do coroutines in c fairly easily, no need for threads.

        1. 1

          yeah, but then you need a non blocking runtime instead of being able to just call C functions like go functions etc.

      3. 2

        Given the memory constrained nature of micro-controllers, I’m curious how actually viable the -gc=dumb option would be for any kind of non-toy program?

        1. 1

          Go does use an intermediate cpu-independend assembly language.

          I am curious if TinyGo reads this to reduce maintenance burden, or do all the parsing from “raw go”.

          1. 1

            You forgot about runtime.

            1. 2

              The answer might be somewhere around there: https://tinygo.org/compiler-internals/differences-from-go/