Java 'final', C 'const'
Java 'final', C 'const'
Posted Nov 2, 2006 15:20 UTC (Thu) by jreiser (subscriber, #11027)In reply to: Buried in warnings by Asebe8zu
Parent article: Buried in warnings
If the final value is (or could be) assigned at declaration, then the C keyword const suffices.
My own favorite candidate for compiler enhancement is a message, "warning: 'const' omitted". The compiler detected that there would be no complaints if the programmer supplied the keyword const.
