What is the term in programming language creation that is the rationale for symbol reuse? Though potentially confused with overloading, it is not so much the application of symbol reuse, but the logical result of a limited vocabulary in the world of common symbols.
I seem to recall running in to the term when reading about the development of C - that one eventually runs out of simple symbols, so the language designers took a reasonable approach to use familiar symbols to mean different things, rather than invent new symbols for every new need. Additionally, they desired to stay within the 7-bit ASCII alphabet. The particular meaning is determined by the number/type of operators used or the broader context.
An example is from C/C++ where <
is used as
- a delimiter in template definitions (
template <int N>
) - #include delimiter, searching system headers first (
#include <filename>
) - a less-than comparison operator (
x < y
) - left bit shifts (
x << n
) - the ostream operator (
std::cout << val << std::endl
)
Point - there are cases of symbol reuse beyond strict overloading, and I believe that there is a one-word term whose definition is something like "the condition of using the same symbols for different purposes by necessity or for the sake of maintaining familiarity."
Asked By : it's scientific
Answered By : it's scientific
Parsimony - after weeks of racking my brain, it finally hit me, but it's not a CS-specific word.
Generally, the word just means "miserliness in resource usage" or "stinginess," but it's a good word for what the professor intended. Language designers want to minimize resources, for reducing both character sets and the required familiarity of the programmer with character sets. Again, C designers for instance, wanted to stay within 7-bit ASCII.
An even closer application of 'parsimony' is the Maximum Parsimony problem. The goal is to find the minimum number of genetic sequences that can compose a given set of genotypes. It's particularly important in understanding evolutionary trees and gene inheritance, and generally NP-complete. Regarding programming languages, one might want to find the minimum number of character symbols required to express all necessary tokens, unambiguously, to the compiler.
Here is a Stanford project on the matter of Halotyping.
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/42980
0 comments:
Post a Comment
Let us know your responses and feedback