Symbol Tables is an actively used design pattern created in 2004. In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier (a.k.a. symbol) in a program's source code is associated with information relating to its declaration or appearance in the source. In other words, the entries of a symbol table store the information related to the entry's corresponding symbol. Read more on Wikipedia...

15Years Old
  • Symbol Tables ranks in the top 25% of entities I track
  • the Symbol Tables wikipedia page
  • Symbol Tables first appeared in 2004
  • Have a question about Symbol Tables not answered here? Email me and let me know how I can help.

Languages with Symbol Tables include c, python, racket

Example from c:

// Declare an external function
extern double bar(double x);

// Define a public function
double foo(int count)
    double  sum = 0.0;

    // Sum all the values bar(1) to bar(count)
    for (int i = 1;  i <= count;  i++)
        sum += bar((double) i);
    return sum;
// Symbol Table:
// Symbol name|Type|Scope
// bar|function, double|extern
// x|double|function parameter
// foo|function, double|global
// count|int|function parameter
// sum|double|block local
// i|int|for-loop statement

Example from python:


Example from racket:

;; Some programming languages allow the symbol table to be manipulated at run-time, so that symbols can be added at any time.

Last updated August 9th, 2020

Edit Symbol Tables on GitHub