6 ms·
I wish I could use 'type' as a variable name or as a field on a struct. It's one of the most used identifier names and the inability to use it is frustrating.
by da4c30ff 11y ago
I wish I could use 'type' as a variable name or as a field on a struct. It's one of the most used identifier names and the inability to use it is frustrating.
- heinrich5991 11y agoYou could sidestep it like Python does, adding an underscore after variables that are named the same as keywords (e.g. `type_`).