Solod: Go can be a better C

(solod.dev)

25 points | by koeng 3 days ago

3 comments

  • bb88 1 hour ago
    How does it deal with pointers if everything is stack based? You can't really return a pointer to something on the stack because it could get overwritten between when you return it and when you access it.
    • zabzonk 31 minutes ago
      Well, it does say:

      "Everything is stack-allocated by default; heap is opt-in through the standard library."

      So it supports both stack and heap, and I guess static allocation too.

  • leecommamichael 1 hour ago
    I really like this idea. I was reading a post earlier about how Go generics are implemented, and how they're sort of leveraging root GC-types in the "runtime" to avoid the same bloat as monomorphization causes in, say, C++. I wonder how Solod will do that? I guess plain monomorphization? I guess that's fine since C compilers are so speedy.
  • heyitsdaad 14 minutes ago
    Insert Look What They Need To Mimic A Fraction Of Our Power meme here.