Ruby dmitrytsepelev.dev

Why Ruby has symbols  ↦

Most Ruby engineers know the difference between symbols and strings from a usage perspective. So, in this article I look at them from a different angle.

You’ll learn about a cool compiler optimization called “string interning”, which is used in many languages. Also, you will understand what happens when (almost any) interpreter runs your code, take a look at the AST and take a peak at the symbols interpretation at the low level.


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00