Why doesn't Android use more enums?

前端 未结 3 1580
抹茶落季
抹茶落季 2020-12-02 09:27

I\'ve started to really like using C# and Java enums in my code for several reasons:

  • They are much more type-safe than integers, strings, or sets of boolean fl
3条回答
  •  星月不相逢
    2020-12-02 10:06

    Integers are smaller, and require less overhead, something that still matters on mobile devices.

提交回复
热议问题