Can something be initializable?

I created the Initializable interface, but according to Dictionary.com , this is not a word. A Google search yields only 30k results, and they are mostly API links.

Is there another word for describing what can be initialized ( )?

Edit:

Thanks for the questions about being in the constructor, which might be the best way. Now they are static classes (same static as in Ruby) that dynamically load and have some initialization tools.

+6
interface
source share
9 answers

Technical people are constantly creating new words. (see example below). But this is not the case of creating a new word. This is a case of "derivation." You perfectly understand the word (“initialize”) and add an impeccable derivative suffix (“capable”) to it. The resulting initialized word is a derived word.

In short, if something can be initialized, it is initialized. Just like it can be workable or suspended.

Now I don’t think it will be long before the grammar. The Nazis point out the error of my paths here. But English is a rich and expressive language. For this, the words do not have to be listed on "dictionary.com". Even on mw.com (which I think is the best site).

One of my favorite books is Garner Modern American Usage . This is a great book and more than a dictionary, it is a reference and guide to using American English.

"Atomic" is a good example of what word we use in software development all the time, which is a "composed" word. In the context of development, what happens is atomic, or does not happen - it cannot be divided into separate operations. But the general definition of the word does not account for this use.

Bah! Here is the best ... "Grep" Not in the dictionary - but nevertheless, a great word. I use it all the time

+17
source share

What about -

interface ICanBeInitialized 

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

 interface ICanHazInitialization 
+5
source share

I think that the question that is different from the pedantic one about the word, which I will discuss below, is that the behavior that you intend to identify with this "Initialized" tag may be.

It is not an unusual style to write a private init () method in, for example, Java, to perform complex initialization; since this code may be needed in several places (as with copy constructors, clone operations, etc.) this is just a good form. Its a less common but valid thing for this is to create a “forward” class, but which expects some asynchronous operation to be fully initialized (for example, an asynchronous completion pattern for tones). So this is not necessarily the case that it should only be in ctor, but I'm curious what the actual behavior you want will be.

In a word, English is a somewhat agglutinating language, like German: there are grammatical rules that build works from basic words and syllables in templates. one of them is here, "Initial" → "initialize" => "initializable". Any native speaker recognizes “initialized” as something that has the property of being able to be initialized. Thus, this word is meaningful, but it does not have in the dictionary for the same reason that it does not have separate entries for plurals.

+3
source share

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

I think that worse words than Initializable were invented, such as "stringize" and "RAII" (I don't know a word, but it is still a term that is often used and makes me cringe each time - although the concept is twofold) .

The problem with Initializable is that it looks like the interface that the constructor runs.

+2
source share

If Google returns API links for "Initializable", it seems to me that this is the correct name for the interface, although it may not be a valid English word. There is nothing wrong with using a written word if it is descriptive.

The only thing I'm confused with is the classes, which, as a rule, can be initialized through their constructor. How does your interface provide functionality not available with the constructor? The answer to this question can give a more descriptive name than just "Initializable". (i.e. how is it initialized?)

+1
source share

If Initializable most clearly describes what an interface is, I would not want to try to find another word so that it is the correct English word. As long as this is not a user interface line, priority should be to clear the naming of the invalidity of the word in English.

+1
source share

Yes, everything is in order. Programming terms do not have to be in the dictionary. Dictionary.com also does not like "Serializable", and we all know that one is OK.

+1
source share

Yes. Do not let the absence of an existing word ruin your work if the meaning is clear.

+1
source share

For those who ask about using initialization, you can put the constructor logic in the void method to avoid race conditions when building loosely coupled classes through factories.

Factory example:

  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 May Cause a Race State

  public class Class { public Class() { Factory.CreateSingleInstance<OtherClass>(null, null); } } public class OtherClass { public OtherClass() { Factory.CreateSingleInstance<Class>(null, null); } } 
0
source share

All Articles