JuliaLang/julia — pull request #7540 by stevengj (2014-07-07 19:54:06+00:00)
Title: print invalid-identifier symbols as symbol("..."); fixes #7188

This modifies the AST display code so that `symbol("foo bar")` is `show`ed as `symbol("foo bar")` rather than as `:foo bar`. Valid identifiers continue to be `show`ed as `:foo`.

To detect valid identifiers, the `jl_id_start_char` and `jl_id_char` functions are exported from `flisp` and are called from `Base.isidentifier` (which is currently not exported).

In #7188 it was discussed whether some shorthand like `sym"foo bar"` could be used instead of `symbol("foo bar")`. I think this should be discussed in a separate issue.