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

Thanks krallja!

I hear you about the enum -- it's not the best programming experience. Unfortunately, for performance it's much faster for SyntaxTokens to be struct types, which means no inheritance and thus no sum types. In addition, the SyntaxKind allows a faster check on the SyntaxToken Kind since you can simply pull an int field, rather than having to do a runtime type check.



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

Search: