2 ms·
Does Go allow unicode subscripts in variable names? Of the languages I've checked, Perl, Python, and JavaScript (in Chrome and Firefox) do not. PHP does.
by tzs 3y ago
Does Go allow unicode subscripts in variable names?
Of the languages I've checked, Perl, Python, and JavaScript (in Chrome and Firefox) do not. PHP does.
- sapiogram 3y agoIt does. Not exactly surprising, since Rob Pike and Ken Thompson made both Golang and UTf-8.
- eviks 3y agoit doesn't (that's subscript 1)? > invalid character U+2081 '₁' in identifier Though that's also not surprising given how poor overall Unicode support is
- eviks 3y agodoesn't seem like it > invalid character U+2081 '₁' in identifier But AutoHotkey does allow it super² := 1, sub₂ := 2