<div dir="ltr">It would be nice to have literal keywords/symbols.  By this I mean, terms that look like words but are not previously defined variables.  <div><br></div><div><b>Prior art</b></div><div><b><br></b></div><div>Some other languages prefix by colon, <font face="monospace, monospace">:foo,</font>  or use a backtick,  <font face="monospace, monospace">`foo.</font><div><font face="monospace, monospace"><br></font></div><div><div style="font-family:monospace,monospace">julia> :foo</div><div style="font-family:monospace,monospace">:foo</div><div style="font-family:monospace,monospace">julia> typeof(:foo)<br></div><div style="font-family:monospace,monospace">Symbol</div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace"><div>user=> :foo</div><div>:foo</div><div>user=> (type :foo)</div><div>clojure.lang.Keyword</div></div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace"><div>user=> `foo</div><div>user/foo</div><div>user=> (type `foo)</div><div>clojure.lang.Symbol</div></div><div style="font-family:monospace,monospace"><br></div><div><b><font face="arial, helvetica, sans-serif">Why is this useful?</font></b></div><div style="font-family:monospace,monospace"><b><br></b></div><div><font face="arial, helvetica, sans-serif">One use case in NumPy/Pandas use is to specify columns or fields of data without resorting to strings.  E.g. </font></div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">df = pandas.load(...)</div><div style="font-family:monospace,monospace">df.sort(:name)</div><div style="font-family:monospace,monospace"><br></div><div><b><font face="arial, helvetica, sans-serif">What do people do now?</font></b></div><div style="font-family:monospace,monospace"><b><br></b></div><div><font face="arial, helvetica, sans-serif">Currently people use auto-generated attributes</font></div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">df.sort(<a href="http://df.name" target="_blank">df.name</a>) </div><div style="font-family:monospace,monospace"><br></div><div><font face="arial, helvetica, sans-serif">or strings</font></div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">df.sort('name')</div><div style="font-family:monospace,monospace"><br></div><div><font face="arial, helvetica, sans-serif">auto-generated attributes work great until you want to use chained expressions</font></div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">df.change_dataframe().sort(some_new_column_not_in_df)</div><div style="font-family:monospace,monospace"><br></div><div><font face="arial, helvetica, sans-serif">strings work but feel unpleasant</font></div></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><b>Prior discussion?</b></font></div><div><br></div><div>This is a common language construct so my guess is that it has come up before.  Sadly Google searching the terms <i>keywords</i> and <i>symbols</i> results it a lot of unrelated material.  Can anyone point me to previous discussion?</div><div><br></div><div>There are clearly issues with using <font face="monospace, monospace">:foo</font> in that it overlaps with slice syntax, presumably some other character could be pressed into service if this was found worthwhile.</div></div><div><br></div><div>I can come up with more motivating use cases if desired.</div><div><br></div><div>Best,</div><div>-Matthew</div></div>