In the bazaar of Portland’s medina, you have found a magical lamp. You’ve been told the lamp holds phenomenal cosmic powers (not a legally binding contract). You go home and start rubbing the lamp and something incredible happens:
A Genie appears and tells you that it will grant you one wish about Zig. Not two! Not three! ONE. You can ask for anything; whatever you want. So what will it be?
Remember ONE wish. Ask for more and the genie disappear.
Comptime interfaces, as a replacement for anytype. Any the stdlib fully embracing them. All the code already is a single unit of compilation, so let’s take all the advantages we can. That would make Zig pretty much ideal language for me.
Ok, ok. Type reification which is first class, not second class. You’d know it’s first class if a reified type can be used in every way like an ordinarily declared type, and that isn’t true. Declarations are nerfed.
I already think it’s a fantastic language but would wish it was easier to set up debugging on windows, that zls wouldn’t crash about 5 times a day, that build.zig could provide compile_commands.json, that the zig compiler would work on WSL, less breaking changes (mostly very fine with this one because I appreciate the mentality of not wanting to stay within local maximums).
Tbf the community around contributions is very warm and welcoming and I haven’t made patches in order to move these topics in the direction I’d like but that wasn’t the question.
Honestly, I think even if the language stop getting anything new forever I would still use it. I am very happy with it.
But if I found the genie… I would give comptime every steroid known to man.
Allow comptime to run anything, including opening and editing files. (Currently doing things like that force using the build system).
Also some nicer way to do comptime interfaces than “anytype”
If these count as 2 wishes, then my greed would have been my undoing.
My wish is that Zig continues to resist the urge to add new features. They are the siren song of every language designer, and Zig is one of the few languages that hasn’t fallen victim to the urge to say “yes” too often.
I wish for Zig team’s technical ambition, intellectual honesty, and sheer decency to rub off on the rest of the world just a little bit, maybe we’d have software that actually works from time to time