This still doesn't capture what is IMHO the most easy, accurate way to think about symbols:
Symbols are not variables or objects, they are values. They work almost exactly like a string, except that they're interned so they're much more efficient (particularly for comparisons, which is what makes them great for hash keys).
In fact, you can use strings interchangeably with symbols in many libraries (including most places in Rails).
Symbols are not variables or objects, they are values. They work almost exactly like a string, except that they're interned so they're much more efficient (particularly for comparisons, which is what makes them great for hash keys).
In fact, you can use strings interchangeably with symbols in many libraries (including most places in Rails).