1

Male/Female comes under the category 'Gender'

What category does Living/Deceased come under?

I'm writing a webservice that clients will use, and data will come back like this:

person.Name = "Jeff"
person.Gender = GenderEnum.Male
person.Alive = AliveEnum.Alive or AliveEnum.Deceased

I need to use a clinical and non-offensive word instead of 'Alive' that is professional and makes sense, but I can't think of anything.

Also, person.Alive = AliveEnum.Deceased is a weird way to phrase it because Alive means what it means.

  • Must it be an enum value? Why not just person.Alive = TRUE/FALSE? – Janus Bahs Jacquet Aug 11 '13 at 13:37
  • There's also UNKNOWN for when the data hasn't been supplied – NibblyPig Aug 11 '13 at 13:38
  • 6
    This question appears to be off-topic because it is about naming of variables in code, which is specifically off-topic. – Brian Hooper Aug 11 '13 at 14:00
  • You should move this to EL&U. They'll love this question. – Carl Smith Aug 11 '13 at 18:04
  • I think your person.Alive = AliveEnum.Deceased is confusing you. person.Alive will (generally) be true or false, and as those are perfectly good to describe whether a person is alive or not, person.Alive is entirely reasonable. The property person.Alive is different from the value AliveEnum.Alive: you can use Alive in more than one context. – Andrew Leach Aug 12 '13 at 7:11
2

I'm not an expert on computer programming, so please be merciful! :)

Living (noun) the state of being alive.

Living, alive, the latter usually a predicate adjective, are the simple, basic terms for organisms having life or existence, living figuratively connoting continued existence or activity

This I feel expresses a neutrality which living/dead might be perceived as being insensitive or too direct. To the question "Is this person living?" I could reply: "yes/no/I don't know" So what about Living y/n/?

|improve this answer|||||
2

If you want to avoid an IsAlive-style category name, you could consider vitality:

the power giving continuance of life, present in all living things: the vitality of seeds

So your data could look like:

person.Vitality = VitalityEnum.Alive or VitalityEnum.Deceased
|improve this answer|||||
  • 1
    There's even a Terry Pratchett novel where the undead complain about "vitalism". (Discrimination by the living against those who aren't.) – starwed Aug 11 '13 at 21:46
1

I'd use a boolean instead of an enum because there are only ever going to be two states. In that case, it could be called IsAlive, or IsDead. I wouldn't worry about this terminology. At a big bank I did some work for they didn't flinch from referring (in code) to a person's state in these terms, because it was never exposed to the client so there was never any chance of causing offence.

Alternatively, you could have a DateTime and call it DateOfDeath. If it's null the person is still alive. This is what some systems did.

|improve this answer|||||
  • Originally I was going to use a boolean, but there is the a third state - unknown - which is caused by having no data provided (missing data). There is potentially a 4th state of unknown where the data has been supplied, but states outright unknown. A subtle difference. I don't have to cater for the latter possibility, just the first three states. I think I might get away with using a nullable boolean but I was hoping for a nice enum term as in the future there's a small possibility of a state such as 'presumed dead'. – NibblyPig Aug 11 '13 at 13:42
  • Interesting requirements. Depends on how likely a presumed dead state really is, I suppose. How about a 'StateEnum'? Unspecified/Unknown/Alive/Dead/PresumedDead? What about SchrödingerStateEnum? :) BiologicalState? Vitality? – silves89 Aug 11 '13 at 13:59
1

A general solution would be to call your enum Kleene and allow it to be used for any true/false/unknown situation rather than just being alive. Kleene logic extends Boolean logic with an "unknown/maybe" value.

person.Living = Kleene.True
person.Married = Kleene.False
person.LikesCilantro = Kleene.Unknown

If the language you are using allows for extending enums, you could even add appropriate logic operators.

Kleene.True.and(Kleene.Unknown) => Kleene.Unknown
|improve this answer|||||
  • What has the word "kleene" got to do with English language, I ask myself. This is computer science. – Mari-Lou A Aug 12 '13 at 6:09
  • Kleene's K3 Logic is a form of three state logic compared to 2 state Boolean logic. As such "Kleene" is one of the most reasonable names to give to a 3 state logic data type. "Ternary" is a bit vague, and "Łukasiewicz" is a bit much. – smithkm Aug 12 '13 at 16:06
0

Three states: Live, Dead , Unknown

I don't really understand why there should be a problem. I don't regard any of those words as offensive: merely statements of fact.

[If you're worried about whether being described as Live is offensive, you could be in a lot more trouble with Gender when you come to transsexuals, and others.]

|improve this answer|||||
0

How about LifeStatus http://www.merriam-webster.com/dictionary/life

you can use kleene logic like so

LifeStatus = kleene.true;

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.