Hacker News new | ask | show | jobs
by gitgud 2785 days ago
Using dashes in symbol names is problematic. It becomes impossible to differentiate

    my-var & my - var
As variable declaration or assignment looks very similar to the subtract expression... But if you enforce whitespace, then it's clearer I suppose...
2 comments

There is a quite a lot of experience with dashes in names in FOSS because they are used in shell and Makefile programming, not only in Lisps.

Git commands have dashes: git cherry-pick.

Lots of hits with this: echo /usr/bin/-

The subtract expression in Lisp looks like

    (- my var)
because Lisp uses prefix notation. You would never run into ambiguities since there are no infix operators in Lisp at all.