Help me compare Zig and Go for my use case(s)

Currently going through ziglings after doing similar with go and rust. Rust is out of the picture, too complex for what I need. So, I’m trying to decide between Go and Zig.
My background is Typescript/Javascript, purely for webapps, full stack, for about 20 years, and 20 more years on stuff that is long dead :slight_smile:

I’m not looking to replace Typescript, but I have some side projects/hobbies that require something else, hopefully Zig. Here are the main ones:

  1. Arduino
  2. Simple game development using Godot (teaching my kid)
  3. Simple web backend services that require speed (proxies, API endpoints, etc.)
  4. Simple Linux CLI/TUI tools
  1. and 4. are easy I guess, anything can do. I’m mostly interested about 1. and 2.
    Trouble is, I’ve done all this with a mix of C, Go, GDScript and since I don’t need it too often, I’m not good at any of those 3 :slight_smile: Ideally, I’d like to invest time in a language that can cover all those cases reasonably well.

I’ve browsed about some tools to run Zig on Arduino and in Godot, but I’m curious about first hand experiences and comparisons.

Fact: Zig is suitable for (1) Arduino, go is not.

Opinion: Currently go is better for (3) web backend development; eventually zig will be good for both frontend (webasm) and backend development but is not there yet.

2 Likes

I’ll bite, can you expound on Zig being good for Front end development.

Are you talking about some WASM dreamscape or something?

Yes, I am talking about web assembly.

I would lean toward Python (or any GC language) for everything except the stuff genuinely requiring speed. Garbage collection is useful. Computers are stupid fast.

If you’re going to step off the happy path on Arduino with Zig, there’s not a lot of point in picking an Arduino. The whole point of Arduino is the community and using Zig would throw that out.

As for doing game development with you child, do you want to teach “game development” or “programming”? Those two are very different things.

I like Zig very much, but I never recommend Zig unless you really have a solid reason to use Zig.

1 Like