| ▲ | galangalalgol an hour ago | |||||||
What do you like to ise those features for? | ||||||||
| ▲ | xyzsparetimexyz an hour ago | parent | next [-] | |||||||
In rust, having unused variables as a warning (but not an error) let's you refactor code, test it and see what is now unused as a result. You can then remove the unused items. Zig requires you to remove the unused items (e.g. with '_ = ...;' which is then something you might forget about) before testing, increasing friction. Multiline comments are less important, but its still convenient for commenting out large chunks of code. IDEs make this a bit easier when you can press e.g. Ctrl+/ to comment out the selected lines with //, but it doesn't work in all cases. The friction stops zig from being fun imo. A shame because I really like comptime. | ||||||||
| ||||||||
| ▲ | Weebs an hour ago | parent | prev [-] | |||||||
Not the person you replied to but I leave unused variables as future TODOs. It's a warning in F#. I also often use them for inspecting data in the debugger | ||||||||