c# – Is there any justification for this change? Change in the pattern of variables

Question:

A co-worker read on a forum that using short, int and long was the correct and best way to perform the system, so it started to change in every screen and class he worked on. I searched and didn't see any gain, except for the fact that there is some loss of bytes when working with double conversions, but that's not the issue, the issue is that it's changing the system's default that was all made using Int16 types, Int32 and Int64, and then we now have a few classes and screens with another pattern.

The question is: Is there any justification either by development pattern, system gain, or is it more beautiful to use this way? Any reason that justifies this destandardization of development that this "improvement" is generating?

Answer:

Generally, there is no justification for going against the established standard. If the project is using 100% int , long , and short , keep using it, even with Int16 , Int32 , and Int64 .

Now, I think the worst thing I could do is leave the project with this mix — it's hard to keep track of which pattern it should be following.

If your colleague started to change everything to int , I believe he would have to change everything , leave nothing in the other way.

Scroll to Top