3 ms·
Super excited to see what you did with Roslyn! We'd love feedback on things we could do to improve the experience!
by Locke1689 11y ago
Super excited to see what you did with Roslyn! We'd love feedback on things we could do to improve the experience!
- krallja 11y agoThanks Andy! Really short feedback: - SyntaxTrivia is a great idea, if a little hard to grok. I wish I'd have thought of it for Wasabi's comments. (CComment inherits from CStatement, which is CLEARLY wrong.) - The SyntaxKind enum is a giant blob of magic numbers. I would have appreciated it being implemented as sum types.
- Locke1689 11y agoThanks 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.