tags:

views:

333

answers:

9

I've created an interface called Initializable, but according to Dictionary.com this is not a word. Searching Google only gives about 30k results and they are mostly API references.

Is there another word to describe something that can be initialized (which is a word)?

Edit:

Thanks for the questions about it being in the constructor, that may be a better way. Right now they are static classes (as static as can be in Ruby) that get loaded dynamically and have some initilization stuff to do.

+1  A: 

If Google gives back API references for "Initializable", it seems to me like a valid name for an interface, even though it might not be a valid English word. There's nothing wrong with using a made-up word, as long as it's descriptive.

The only thing I get confused about is classes are typically able to be initialized through their constructor. How does your interface provide functionality not available through the use of a constructor? The answer to this question may provide a more descriptive name than simply "Initializable". (i.e. in what way is it initializable?)

lc
+2  A: 

I see nothing wrong with making up a word for an API-like thing if the invented word is clear.

I think worse words than Initializable have been invented - such as 'stringize' and 'RAII' (I nkow it's not a word, but it's still a term that's used often, and makes me cringe every time - even though the concept is doubleplusgood).

The problem I might have with Initializable is that it sounds like an interface that does what a constructor should be doing.

Michael Burr
+1  A: 

If Initializable most clearly describes what the interface is about, I wouldn't care about trying to find another word just so it is a valid English word. As long as it's not a UI string, the priority should be in naming clarity not validity of the word in the English language.

codelogic
+2  A: 

How about -

interface ICanBeInitialized

or...(and I had a little xmas drinky...so sorry)

interface ICanHazInitialization
Kev
+1 just because I like having a LOL code.
Charlie Martin
+1  A: 

Yes, it's fine. Programming terms don't have to be in the dictionary. Dictionary.com also doesn't like "Serializable", and we all know that one's OK.

jeremcc
+1  A: 

Yes. Don't let the lack of an existing word spoil your creativity if the meaning is clear

JaredPar
+10  A: 

Technical people create new words all the time. (see example below) But this isn't a case of creating a new word. This is a case of a "derivation". You have take a perfectly good word ("initialize") and added a perflecty good derivative suffix to it ("able"). The resulting word initializable is a derivative word.

In short, if something can be initialized, it is initializeable. Just like it can be runable, or stopable.

Now, I don't think it will be long before a grammar Nazi points out the error of my ways here. But English is rich and expressive language. A word doesn't have to be listed on "dictionary.com" for it to be valid. Nor even on m-w.com (which I believe is a better site).

One of my favorite books is Garner's Modern American Usage. Its a great book and is more than a dictionary - it is a reference and guide on how American English is used.

"Atomic" is a good example of a word we use in software development all the time that is somewhat of a "made up" word. In a development context something that is atomic either happens, or does not happen - it cannot be divided into separate operations. But, the common definition for this word doesn't take this usage into account.

Bah! Here is a better one.... "Grep" Not in the dictionary - but yet, a perfectly good word. I use it all the time

Foredecker
Yeah, what he said. A quibble: "atomic" in our sense, of being indivisible, is a perfectly good use, and consistent with the original greek.
Charlie Martin
Compilable is also not a word but perfectly understood among us. How about Google? This was not a word. Now it is termed as a Verb in dictionaries. Orkutting is frequently used by people who are using Orkut. In a nutshell don't worry about dictionaries.
Pradeep
English even has a word for these words: neologism.
outis
+3  A: 

I think the question --- other than the pedantic one about the word, which I'll mention below --- is what the behavior you intend to identify by this "Initializable" tag might be.

It's not an uncommon style to write a private method init() in, eg, Java to do complicated initialization; since that code may be needed in several places (what with copy constructors, clone operations and so on) it's just good form. Its less common, but a valid thing to so, to have a "Forward" class that is constructed, but that is waiting for some asynchronous operation in order to be fully initialized (eg, the Asynchronous Completion Token pattern). So it's not necessarily so that this should be just in the ctor, but I'm curious what the actual behavior you want would be.

On the word, English is a somewhat agglutinating language, like German: there are grammatical rules that construct works from base words and ther syllables in patterns. one of those is the one here, "Initial" -> "initialize" => "initializable". Any native speaker will recognize "initializable" as something that has the property of being able to be initialized. So it is a value word, but one they don't have in the dictionary for the same reason that don't have separate entries for the plurals.

Charlie Martin
A: 

For those questioning the use of initialize - you may want to put constructor logic in a void method so to avoid race conditions when constructing weakly coupled classes through factories.

Example Factory:

    public static T CreateSingleInstance<T>(string providerName, string sectionName)           
    {
        //create the key
        ProviderKey key = new ProviderKey(providerName, typeof(T));

        //check key
        if (!_singletons.ContainsKey(key))
        {
            object provider = _singletons[key] = CreateInstance<T>(providerName, sectionName);

            IInitializable initializableProvider = provider as IInitializable;
            if (initializableProvider != null)
                initializableProvider.Initialize();
        }

        return (T)_singletons[key];
    }

Example Implementation Constructors that would cause a race condition

    public class Class
    {
        public Class()
        {
            Factory.CreateSingleInstance<OtherClass>(null, null);
        }
    }
    public class OtherClass
    {
        public OtherClass()
        {
            Factory.CreateSingleInstance<Class>(null, null);
        }
    }
Richard Spence
I'd be more worried about the infinite loop than the race condition.
eyelidlessness