Tag Info

New answers tagged

2

I program OO mostly in C#, which shares a lot of syntax with Java, so I'll speak from that perspective. For anything that is a "public API" I use a non-static method. Rarely do I use static methods. Why? If it's virtual/not-final I can override the behavior in a subclass. In the industry I work in we do a lot of customizations for our customers so this ...


6

The code form you want is called A-normal form (ANF); it is not always more readable, but it might be more easily tranformable inside compilers, and is useful for precise garbage collection (hence, many compilers are transforming the source code into some intermediate ANF). See also SSA form. I don't believe that ANF is always more readable; on the ...


1

Always put the code for if, while, etc in “{}” with the brackets on their own line. A bad merge is then much more likely to lead to code that will not compile. Do not have lot of boiler place comments, for example. //----- // Arther AXB // Date method was added:: //----- Often the merge will decide the 2 methods are the same due to the ...



Top 50 recent answers are included