I am a software developer with about three year experience (mostly JVM languages) and currently reading Code Complete 2.
Because of that I wondered why I never had a chance to use short or byte - or at least I never saw one.
Of course I have learned about those, but during my professional time (circa 3.5 years and 4 projects) as a developer I believe to never have stumbled upon any usage.
I am just wondering whether they are or are not obsolete by now, because the performance gain seems to be not too extraordinary.
So with that in mind I imagine a byte type being useful for reading / writing binary formats [0] (e.g. for sending small amounts of data over a network). A byte or short type can also be useful for using bitfields [1]. In some use cases you might want to use a small type to store the flags (e.g. if you don't need 32 flags, it seems a waste to use a Int32 type).
---
[0]: https://www.codejava.net/java-se/file-io/how-to-read-and-wri...
[1]: https://en.wikipedia.org/wiki/Bit_field