Monday, March 28, 2011

Canonical term for something that can only occur once? Something that can occur multiple times?

I'm really anal about what I name my classes, and I need an adjective for both something that is only allowed to happen once, as well as something that is allowed to happen multiple times.

examples:

  • wordthatmeansitcanonlyhappenonceTrigger
  • wordthatmeansitcanhappenmultipletimesTrigger
From stackoverflow
  • I usually use 'OneTime' for the single shot, and nothing particular for the multiple case. It's not really canonical though...

  • onceTrigger, manyTrigger

    oneTrigger, manyTrigger

    Also, sometimes I just don't name one (once or many) and name the other (once or many) to make it stand out. Maybe you could just put an 's' on the end of one and not the other.

    Ross : I ry to distinguish between plurals and singlular a lot in my methods. E.g. createPost() and fetchPosts(...)
  • I just use "OneTime." Maybe it's a poker thing.

  • OneShotTrigger
    RepeatableTrigger

  • OneShotTrigger and RecurringTrigger

    xtofl : especially like the 'Recurring' in that.
    Daniel Schaffer : +1 for Recurring, not so crazy about "OneShot" - maybe I'll just use "NonRecurring"
    gnovice : "OneShotTrigger" sounds pretty good to me. Perhaps "ResetTrigger" instead of "RecurringTrigger"?
  • How about

    • SingularTrigger
    • PluralTrigger

    Also, I don't think this is exactly what you're getting at, but this may be related to Idempotence.

  • For one time: nonce.

    Paul Dixon : in the UK the first thing that springs to mind for "nonce" is "sex offender" :)
    Ross : @Paul: I guess I'm sheltered: never heard of that before ;)
    Patrick McElhaney : You might go with Trigger and NonceTrigger. Don't see why they both need special names. :-)
  • You could call them WyclefJeanTrigger and TimMcGrawTrigger. ;-)

  • With tongue ever so slightly in cheek, how about:

    • BirthTrigger - you only get born once.
    • BirthdayTrigger - but you can have lots of birthdays
  • Singular or Once

  • SingleShot and Repeating are commonly used.

  • singleTrigger
    multiTrigger

  • MonochronicTrigger
    PolychronicTrigger

0 comments:

Post a Comment