JuliaLang / JuliaDoc

28 stars 26 forks source link

Explain or link to first use of :symbol #27

Open mark-summerfield opened 7 years ago

mark-summerfield commented 7 years ago

In http://docs.julialang.org/en/latest/manual/strings.html there is this example: julia> m=match(r"(?\d+):(?\d+)","12:45") RegexMatch("12:45", hour="12", minute="45") julia> m[:minute] "45"

I'm guessing that :minute is a symbol name (like in Ruby). But I think the example should show, first, what people would expect: julia> m["minute"] and then the symbol syntax (for non-Rubyists): julia> m[:minute] And explain the :symbol or at least give a link to where it is explained later on (which I presume it is---I'm just commenting as I read the manual for the first time).