Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



It does. Not exactly surprising, since Rob Pike and Ken Thompson made both Golang and UTf-8.


it 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


doesn't seem like it

> invalid character U+2081 '₁' in identifier

But AutoHotkey does allow it

super² := 1, sub₂ := 2




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: