00JCIV00 / cova

Commands, Options, Values, Arguments. A simple yet robust cross-platform command line argument parsing library for Zig.
https://00jciv00.github.io/cova/
MIT License
110 stars 5 forks source link

Reconsider usage of `inline` within Cova. #38

Closed p7r0x7 closed 1 year ago

p7r0x7 commented 1 year ago

https://ziggit.dev/t/inlining-functions/1341/3:

Screenshot 2023-10-26 at 1 37 07 AM
00JCIV00 commented 1 year ago

To my knowledge, I'm not using inline fn functions anywhere (though please feel free to point out an example if I'm mistaken.)

What you may be referring to is my use of inline for loops or inline else in switch statements. While these concepts are closely related, they're not the same. My use of inline for is required to loop over certain datasets, especially those dealing with Type metadata. inline else is used similarly. To my knowledge, the feeling towards using inline for and inline else is almost the opposite to that of inline fn. They're often encouraged, or at the very least not discouraged.

p7r0x7 commented 1 year ago

This was a distinction I was not aware of, and I'm glad to see this too was well thought through! I'll close this and trust that further uses of inline will be decided carefully as well.