Prev: JNI win32 and Layered windows.
Next: Urgent Opening for Senior .Net Engineer position with our direct client in Milpitas, CA
From: Mike Schilling on 17 Mar 2010 23:22 Lew wrote: > Lew wrote: >>> Java programming with types rides the synergy of interfaces and >>> generics to build solid code. > > RedGrittyBrick wrote: >> Gosh, have you been reassigned to a certain other department? >> >> http://www.dilbert.com/strips/comic/2007-09-18/ > > Are you suggesting that Java programming with types does not ride the > synergy of interfaces and generics to build solid code? Certainly Sun^H^H^HOracle's marketing department would agree that it does. But any enginerer who uses the word "synergy" without sarctastic intent should be demoted to whiteboard eraser.
From: Ian Smith on 18 Mar 2010 04:29 Kevin McMurtrie wrote: > > Consider a situation where the design starts out using Enum but later > needs to load definitions from a configuration file. That can't be done > with Enum, EnumMap, or code that works with them. The original poster > mentioned having large sets of definitions of Colors so I think a design > using Enum would run into future problems. Point taken (and I totally agree in the situation you describe), but as I read it the OP was about _specifically_ about initializing an object with pre-defined values. Ho hum, Ian.
From: Roedy Green on 20 Mar 2010 09:37 On Thu, 18 Mar 2010 08:29:51 +0000, Ian Smith <ian.smith(a)gossinteractive.com> wrote, quoted or indirectly quoted someone who said : >Point taken (and I totally agree in the situation you describe), but as >I read it the OP was about _specifically_ about initializing an object >with pre-defined values. Ho hum, The crucial limitation of enums is you must modify code and recompile if you want to add another choice. They are mainly useful where there is some custom code associated with each choice. -- Roedy Green Canadian Mind Products http://mindprod.com Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, �How would I develop if it were my money?� I�m amazed how many theoretical arguments evaporate when faced with this question. ~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming.
From: Roedy Green on 20 Mar 2010 09:44
On Sat, 20 Mar 2010 06:37:06 -0700, Roedy Green <see_website(a)mindprod.com.invalid> wrote, quoted or indirectly quoted someone who said : >The crucial limitation of enums is you must modify code and recompile >if you want to add another choice. They are mainly useful where there >is some custom code associated with each choice. You would use an enum IF 1. the set of choices is stable. or 2. if you would have to write new code anyway to custom handle that choice if a new choice were added. -- Roedy Green Canadian Mind Products http://mindprod.com Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, �How would I develop if it were my money?� I�m amazed how many theoretical arguments evaporate when faced with this question. ~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming. |