Blogging Roller
Dave Johnson on open web technologies, social software and Java
Dave Johnson on open web technologies, social software and Java
I work with a couple of Programming Languages geeks who are, it seems, always Scheme-ing and Smalltalking behind Java's back. One of these guys has a thing about the final key word. He believes that all fields, variables, classes, arguments, etc. should be final be default and that, instead of having a final keyword to declare immutables, Java should have a mutable keyword to declare those that may be mutated.
He argues that, wherever possible, fields, variables, classes, arguments, etc. should be declared final. Since Java does not default to final, you should default to final. Here are some advantages to this:
Tags: Java
Posted by PaulRivers on August 12, 2003 at 11:49 PM EDT #
Posted by Chris Nokleberg on August 14, 2003 at 01:43 AM EDT #