# What are Symbols for?

**URL:** <https://discourse.julialang.org/t/what-are-symbols-for/89082>\
**Category:** New to Julia\
**Created:** [October 21, 2022, 7:53pm UTC](https://discourse.julialang.org/t/what-are-symbols-for/89082 "2022-10-21T19:53:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chadagreene](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chadagreene/32/34924_2.png) [@chadagreene](https://discourse.julialang.org/u/chadagreene)\
**Post date:** [October 21, 2022, 7:53pm UTC](https://discourse.julialang.org/t/what-are-symbols-for/89082/1 "2022-10-21T19:53:02Z")

</div>

Today I came across the Symbol type, but I don’t understand what it’s for. The [online documenation](https://docs.julialang.org/en/v1/base/base/#Core.Symbol) offers these two examples:

```julia
julia> :name
:name

julia> typeof(:name)
Symbol

julia> x = 42
42

julia> eval(:x)
42

```

and when I search the help menu in the REPL I see these two examples:

```julia
  julia> Symbol("my", "name")
  :myname
  
  julia> Symbol("day", 4)
  :day4

```

All of the examples above show syntax, but it’s unclear when any of the cases above might be useful for anything.

When might anyone ever use `:myname` or `:day4` or `eval(:x)`?

---

<div class="post-metadata">

**Author:** ![Krastanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krastanov/32/6817_2.png) [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Post date:** [October 21, 2022, 7:55pm UTC](https://discourse.julialang.org/t/what-are-symbols-for/89082/2 "2022-10-21T19:55:01Z")

</div>

check this out, it is a good overview [What is a "symbol" in Julia? - Stack Overflow](https://stackoverflow.com/a/23482257/669329)
