• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

enum insid a class vs enum outside the class

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I prefer to declare enum inside the class over declaring enum outside the class because that will will help to fix bugs as programmer know knows where enum was first appeared.

Any Thoughts..........
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What kinds of bugs will that help to fix?
 
Costa lamona
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, Typically, precisely, I don't know

But Think about it, you declare enum inside the class then , thats mean
You needed some variable in that class that needs to be a enum, then when a Bug is produced and enum is involved some how in that bug, then you know that this nasty variable which caused the bug must be in that class which enum is enclosed in.

so you trace from there out to the reset of classes.

but You are absolutly right, because "Doing things that reduce bugs usually done using experience, not by my "BlaBlaBlaBom" way of thinking.

by the way "BlaBlaBlaBom" is way of thinking when you are in the bathroom, believe me It is better that singing.

Is that make any sense to you, Or you will never read my posts again.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic