Conversation
electrical engineers when you tell them magic numbers are programming antipatterns
1
2
5
@twinspin6 i put my magical numbers in enums nowadays, that feels decently clean
1
0
1
@snacks what do you mean... i require context
1
0
0
@twinspin6 well, only makes sense if you have a set of magical numbers that are needed together, but you can usually set what number an enum value corresponds to, so you get a nice statically typed collection of arbitrary, named numbers
1
0
1
@snacks they are no longer magic numbers if you give them a name
1
0
1
@coolbean @twinspin6 the number which shall not be named (it is between 3 and 5)
0
0
2