Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is this called in computer science?
    primarykey
    data
    text
    <p>A lot of programming languages and frameworks do/allow/require something that I can't seem to find the name for, even though there probably is one in computer science. What they basically do is bind to a variable/object/class/function by name. </p> <p><a href="http://www.adobe.com/products/flex/" rel="noreferrer">Flex</a> example ("selectAll()"):</p> <pre><code>&lt;mx:Button click="selectAll()" label="Select All"/&gt; </code></pre> <p><a href="http://mate.asfusion.com/" rel="noreferrer">Mate</a> example ("price"):</p> <pre><code>&lt;Injectors target="{QuotePanel}"&gt; &lt;PropertyInjector targetKey="price" source="{QuoteManager}" sourceKey="currentPrice" /&gt; &lt;/Injectors&gt; </code></pre> <p>Java example ("Foo"):</p> <pre><code>Class.forName("Foo") </code></pre> <p>There are many other examples. You get the idea. What troubles me is that there is virtually no way to verify this at compile-time, and not much the IDE can do to help in terms of code completion, navigation, and refactoring. But that's besides the point.</p> <p>My question is, what is this called? <strong><em>I don't think it's one of these: <a href="http://en.wikipedia.org/wiki/Dynamic_binding" rel="noreferrer">dynamic binding</a>, <a href="http://en.wikipedia.org/wiki/Name_binding" rel="noreferrer">name binding</a>, <a href="http://en.wikipedia.org/wiki/Reflection_(computer_science)" rel="noreferrer">reflection</a></em></strong></p> <p><strong>Update</strong>: No, this is not a quiz, sorry if it sounds like one. It's simply a matter of "name that song" for programming.</p> <p><strong>Update</strong>: Answers that helped:</p> <ul> <li>From Tim Lesher: It's called "late binding", "dynamic binding", or "runtime binding". <em>The fact that it binds by a string is just an implementation detail</em>...</li> <li>From Konrad Rudolph: ...<em>it's simply input for an interpreter</em>.</li> </ul> <p><strong>Update</strong>: As people have correctly pointed out, some of the examples are late binding, some are reflection, some are runtime-evaluation (interpretation), etc. However, I conclude there probably is no name that describes them all. It's just a bunch of examples that do have something in common, but not enough to give it a name. I liked the "everything is a string" answer, but even though it's funny, it doesn't fully do it justice either.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload