If you had one wish for zig, what would it be?

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.

17 Likes

To get all the resources and time it needs to mature into the best language the team can make.

29 Likes

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.

43 Likes

One wish? An optimizer pipeline which smart people can start to populate with passes.

7 Likes

First I’d wish for three more wishes! Then

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 want to see that change.

7 Likes

Personally, for the ecosystem to start maturing.

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.

7 Likes

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.

7 Likes

Typed loop counting variables with reverse order option and increment sizes.

It was discussed before and i mean something like this

for (0..5) |i: u8| {} // 0,1,2,3,4
for (5..0) |i: u8| {} // 5,4,3,2,1 maybe also 0 i dont know
for (0,2..10) |i: u8| {} // 0,2,4,6,8
30 Likes

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.

18 Likes

I’m a simple man, I want to know that my tests ran :laughing:

14 Likes

Your wish is my command (line invocation):

zig build test --summary line

There’s also ZTAP if you’re into that sort of thing.

9 Likes

Limitless time & resources for the zig core team.

11 Likes

I’d like something like the rust book :frowning:
Though I get why it can’t happen because zig is a moving target, but yeah.

4 Likes

I hope that functions and block expressions can directly reference the result position.

12 Likes

No more distinction between var and const. I don’t care and I don’t like the errors it forces on me. Sorry :sweat_smile:

The wisdom not to mess with genies as I might get what I wish for.

8 Likes

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

18 Likes

The wisdom tells you the genie has your best intentions in mind; you’ve used your wish and now know there are no other genies!

2 Likes

Any change that reduces the usage of anytype, in favor of more descriptive function signature.

But to be clear I am often surprised by how l little I know about language design, haven’t been disappointed yet by changes from ZSF

6 Likes

For me it would also be for loop counting variable types, including the ability to do this:

for (0..32) |i: u5| {} // max value does not have to fit the type
18 Likes