Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
da4c30ff
· 11y ago · 0 comments
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.
Comments
[–]
heinrich5991
11y ago
You could sidestep it like Python does, adding an underscore after variables that are named the same as keywords (e.g. `type_`).