# Where's the interpolation in "string interpolation"?

In most contexts, the concept of "interpolation" seems to be related to estimating unknown states from known ones, like video frames or data points.

In the mathematical field of numerical analysis, interpolation is a type of estimation, a method of constructing new data points within the range of a discrete set of known data points.

In engineering and science, one often has a number of data points, obtained by sampling or experimentation, which represent the values of a function for a limited number of values of the independent variable. It is often required to interpolate, i.e., estimate the value of that function for an intermediate value of the independent variable.

In the context of live-action and computer animation, interpolation is inbetweening, or filling in frames between the key frames. It typically calculates the in-between frames through use of (usually) piecewise polynomial interpolation to draw images semi-automatically.

Now, from what I understand, string interpolation is the evaluation of an expression inside a string literal. From the Wikipedia entry on string interpolation:

In computer programming, string interpolation (or variable interpolation, variable substitution, or variable expansion) is the process of evaluating a string literal containing one or more placeholders, yielding a result in which the placeholders are replaced with their corresponding values. It is a form of simple template processing or, in formal terms, a form of quasi-quotation (or logic substitution interpretation). String interpolation allows easier and more intuitive string formatting and content-specification compared with string concatenation.

What I don't get is what exactly is being interpolated during string interpolation. There's no estimation involved in the process, right? Am I interpreting these concepts in the wrong way? How are they related?

• The term interpolation in the English language (and therefore also Mathematics and Computer Graphics) is not about estimation or calculation, it means "insertion". So 'String interpolation' is about inserting values into a string. Dec 26, 2020 at 23:56
• And even IFF everything you were saying were true, your whole question is still based on the wrong premise that there can only be one single meaning of a word, across all possible different communities. That is not true. The same word can mean different things in different communities. For example, the word functor in category theory has also been used in functional programming to mean something closely related. It, however, is also used in C++ to mean something totally unrelated. Dec 27, 2020 at 7:51
• You can't infer anything from the name of a thing. Dec 28, 2020 at 1:24