10

[Code Naming Issue]

Please anyone leave me a comment. Anything will be really helpful for me now.

I am working on what to name a feature which works as part of a module that generates URLs that expire when its expiration time comes. So I thought "Expirable Url module" would be okay. However, the verb 'expire' is intransitive. Is it okay to add suffix '-able' after an intransitive verb? Expirable Url is even a right word?

I guess better 'expiring URL' than 'expirable URL', right?

choiapril
  • 103
  • 2
    That's the great/horrifying thing about programming. You can name things whatever you want. Expirable is not a word, but I would understand it's meaning as a variable. Trust me, I've seen way worse. – Jacobm001 Mar 07 '16 at 06:09
  • @Jacobm001 thanks a lot. Agree with you. But then, how about 'closable url' on the same feature? Sorry for asking again :-) – choiapril Mar 07 '16 at 06:25
  • "URLs that expire when I make it to at the generating moment." Huh? They expire when you generate them? Are they ever not expired? Can you be clearer about when they expire? – candied_orange Mar 07 '16 at 06:32
  • @CandiedOrange haha thanks. I edited. It expires at its expiration time that I decided at its generation. – choiapril Mar 07 '16 at 06:35
  • http://www.thefreedictionary.com/expirable Expirable means capable of expiring or ending. – NVZ Mar 07 '16 at 06:38
  • 1
    temporary, short-lived, and perishable come to mind. – stevesliva Mar 07 '16 at 06:47
  • Simply "expires". It tells the programmer that the field expires. – jimm101 Nov 07 '16 at 14:11

1 Answers1

12

First of all, expirable is a word. It's been hanging around since at least 1913.

expirable

Adjective

That may expire; capable of being brought to an end.

Part or all of this entry has been imported from the 1913 edition of Webster’s Dictionary, which is now free of copyright and hence in the public domain. The imported definitions may be significantly out of date, and any more recent senses may be completely missing

wiktionary

That said, expirable makes me think it has an expiration date. If that's the impression you want then I think you're fine.

Wish more programmers took this much care when naming things.

Expiring URL vs Expirable URL

The semantic difference here is an Expiring URL had better always have an expiration date. Where an Expirable URL might have it's expiration date set, it might not. So pick the name that goes with how you intend to implement.

  • 1
    Since it is able to generate a permanent URL too, I'll take 'expirable'. Thanks everybody. I appreciate it. – choiapril Mar 07 '16 at 07:00
  • 3
    @CandiedOrange "Expiring URL" sounds to me like it is expiring right now. Is that wrong? (I'm not native speaker, just asking question). – frnhr Oct 19 '16 at 15:25
  • @frnhr At first glance, I would generally take it to mean that it was in the process of expiring. But depending on the context, it could also mean that the nature of the URL is that it expires, although that may not happen until the future. So it is an expiring URL; it is URL that expires. – J.D. May 15 '17 at 12:56