I am searching for the correct term usage in my Java code, although you don't need to know anything about programming to answer my question.

  • My "something" can be "required" (mandatory) or not (optional).
  • If it's required, then I want a term that indicates if it's missing or not
  • If it's not required, then it obviously cannot be "missing"

I know the terms I stated are "correct" but I'd like to know other synonyms or even antonym that would express that logic better.

I thought of "lacking", "absent", or "missing" or the antonyms "filled", "exists", or something like this.

I know the semantics are about the same, but I'm sure there's a better way to describe it!

  • essential? unessential? words like "critical" can also help.
    – Fattie
    Jun 30 '11 at 16:07
  • @Joe, I am not trying to find a synonym for "required"/"mandatory", but rather "I AM mandatory, but I am not there (so something is wrong)" I hope I'm clear enough Jun 30 '11 at 16:44
  • 1
    Incomplete? It's not strictly correct because it's the form that's incomplete rather than the field, but it's in the right ballpark. Jun 30 '11 at 16:48
  • maybe something like "shambles" ? :-) Honestly, you should step back and simplify. There is never, ever, a "need" for something to absolutely be there. That's basic science. Just code in conceptual exception handling more carefully. Anyway, this is just comp sci now, not English! Heh! Cheers for now...
    – Fattie
    Jun 30 '11 at 17:38
  • I don't think there is an English word which carries exactly the meaning you want, so for the sake of clarity I would probably be explicit and call it something like isRequiredButMissing. Having said that, I agree with those suggesting that there seems to be a bit of conceptual confusion in your set-up as described.
    – Rupe
    Jul 7 '14 at 10:20

I would say your "something" is required or optional. If it's missing, then it is Undefined, if it's not missing, then it's Defined. (Those terms make more sense in the context of code than outside that context.) The container of your "something" can be Complete or Incomplete. Although Partial might be a better way to say incomplete.

  • I think 'Incomplete' would indeed be right, but, if something is empty but not required (so there's nothing wrong), would it still be considered as 'not incomplete' (therefore 'correct') or that doesn't apply? Jun 30 '11 at 17:41
  • 1
    @dominicbri7 If an Optional something is Undefined, I would still consider the container to be Complete.
    – jimreed
    Jun 30 '11 at 19:50

There are a whole bunch of possible words, but your "mandatory" item is only conditionally required, so any state/property name that makes it seem more mandatory than it really is is going to cause the next developer down the road some problems. If I were a maintenance programmer and saw an object or method name that had big flashing warning lights attached to it, I'd spend a lot of time looking for the place where it actually is required before I gave up. (And if it wasn't actually required anywhere and caused me to waste a lot of time, I just might submit the code to The Daily WTF to blow off steam.)

I'd stick to "clichés" like isEmpty(), isSet() or isNull() for the property or method name; whether or not the object (or variable) is mandatory should be evident in the code:

if (condition1 && !occasionallyMandatoryObject.isSet())
   // trigger error condition
  • I wanted to find a name for a method which basically is : if (isRequired && isEmpty) { // do stuff } How would you call that (something mandatory AND empty)? Jun 30 '11 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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