I'm trying to name a method in a programming language and can't figure out what it should be called.

I'm looking for a single word or phrase that means "If you give me an object I will place it on its placeholder, if you give me nothing, I will remove its placeholder and any object that was on its placeholder"

What I have tried so far but doesn't really make the sense I need it too is "set or remove" so the method reads like

  • For Programming in general, a more descriptive name is better than a easier one, especially since you have IDE's that let you auto fill in the names. – Rivasa Oct 30 '14 at 2:29
  • @Link that's why I am asking for a word or phrase, and I'm writing Objective-C, which is known to be very verbose. Still have the problem though :D – JuJoDi Oct 30 '14 at 2:30
  • Your terminology suggests that you do not have a very good grasp on the mechanics of Objective-C. – Hot Licks Oct 22 '15 at 12:51
  • "Dismiss" probably already has other meanings in your field so I'll just suggest it as a comment, but a dismissed employee is sometimes replaced and sometimes not. – Papa Poule Oct 22 '15 at 13:35

Toggle is a standard term for switching back and forth between opposite conditions, from toggle switch.

  • The issue with toggle is that it generally means to switch between true and false and depends on the current state. In my method, you can change the value, or you can pass nothing to remove the previously set value from existence. – JuJoDi Oct 30 '14 at 2:33

just replace ? if you give me nothing, i will replace the placeholder with nothing. if you give me an object, I will replace the placeholder with the object. Perhaps replacePlaceholder.

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.