Changing from #define to const (uppercase?)
I'm doing a bit of refactoring on some code and I'm seeing #define used a lot to create constants. From what I read I understand that consts with the proper type would be better. But what about the naming style? Should I keep the uppercase for the consts or it should be used exclusively for macros? #define MINUTE_LEN 6 #define SECOND_LEN 6 #define MILISECOND_LEN 11 Should be: const int MINUTE_LEN = 6; const int SECOND_LEN = 6; const int MILISECOND_LEN = 11; or: const int minuteLen = 6; const int secondLen = 6; const int milisecondLen = 11; What is recommended? I feel like the uppercase helps t
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.