Ismael mentioned that in his original post. He is looking for a way to do
that but with a literal syntax (no intermediate string+functioncall).
On Friday, 7 February 2014 12:06:56 UTC-6, Joosep Pata wrote:
>
> julia> symbol("test test")
> :test test
>
> On 07 Feb 2014, at 18:25, Ismael VC <[email protected] <javascript:>>
> wrote:
>
> > julia> a = :test
> > :test
> >
> > julia> typeof(a)
> > Symbol
> >
> > julia> b = :test test
> > ERROR: syntax: extra token "test" after end of expression
> >
> > julia> b = :"test test" # Ruby style?
> > "test test"
> >
> > julia> typeof(b) # Not a Symbol?
> > ASCIIString (constructor with 1 method)
> >
> > julia> b = symbol(b) # How to write it without calling symbol()
> function.
> > :test test
> >
> > julia> typeof(b)
> > Symbol
> >
> >
> > I just red that in Ruby you use:
> >
> > :"test test"
> >
> > in Smalltalk:
> >
> > #'test test'
> >
> > and in Lisp:
> >
> > |test test|
> >
>
>