mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
I was thinking about these after #5526, was wondering how others will feel about this kind of approach: - Adding a helper to `TypeEnum` to get the table construction. - In what were previously `Make` functions, return the element instead of returning the table. - By returning the element, no more need to pass in a nullptr (now have a concrete instance). I think this is a mild simplification, but maybe worth it. Note, would appreciate it if there are thoughts on how to provide a boilerplate `Invalid` implementation (maybe it'd be fine to just return `nullptr` and cause a crash that way, but I was hesitant to do that).