TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Enumerated types can get in the way of fast and safe iteration

3 pointsby iamchrisleover 11 years ago

1 comment

TheLoneWolflingover 11 years ago
Default cases are your friend.<p>Personally, my most wanted feature for enums in general is a way to distinguish between &quot;final&quot; enums - that are intended for enums that cannot change, and a modifiable enums, where they can change and a lack of default case throws a syntax error.<p>Unfortunately, there is no way to enforce someone not changing a &quot;final&quot; enum.
评论 #6729147 未加载