Is global constants an anti-pattern?

后端 未结 7 1651
再見小時候
再見小時候 2020-12-03 03:29

I\'ve always thought having a class just for the sake of holding constants is a bad design. But recently, I\'ve tried googling for it and found only that having an inter

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 04:15

    Global constants are fine.

    Global (non-constant) variables are the work of the devil.

提交回复
热议问题