I am progressing slowly in my study of the "Zig-lang" language, today I see why to implement the last solution.
Ps: nothing better than transcribing a software from one language to another, because we don't care about the conceptual, but about the language.
Yes I would normally do that too. The question asked about having an enum that was being displayed in a gui, and switching on the selected value. Lots of great ways to do it!
For further actions, you may consider blocking this person and/or reporting abuse
Why not just switch on the error and avoid the enum?
Although I personally think it's better to just switch locally at the callsite of the function that may fail, like so:
I am progressing slowly in my study of the "Zig-lang" language, today I see why to implement the last solution.
Ps: nothing better than transcribing a software from one language to another, because we don't care about the conceptual, but about the language.
Yes I would normally do that too. The question asked about having an enum that was being displayed in a gui, and switching on the selected value. Lots of great ways to do it!