Over the int type?
A lot of code either uses int with double/floats.
I know there is the likes of .NET mobile versions so byte/short comes into their own but for desktop apps is there any point?
When I did C++ work (Games programming) I was very aware of each data type I was using though I don’t have this feeling in C#/Java work.
Would there be any benefit of me using a byte say if I know my loop will never go over the bounds of byte?
A single
bytecompared to alongwon’t make a huge difference memory-wise, but when you start having large arrays, these 7 extra bytes will make a big difference.What’s more is that data types help communicate developers’ intent much better: when you encounter a
byte length;you know for sure thatlength‘s range is that of abyte.