Java 'final', C 'const'
Posted Nov 2, 2006 15:20 UTC (Thu) by jreiser
In reply to: Buried in warnings
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.
to post comments)