Quoting advice #2627
-
Hi, I am dealing with abstract labels (as in, graph node names, symbols in formal language theory, etc.) and I wonder whether I should go with If I were doing this in Racket or Emacs Lisp, I would go with quoted symbols. In particular, I would expect that What would be the recommended / idiomatic way to have lists of abstract labels in Hy? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Either is justifiable, and keywords are a viable third option. Which is more convenient will depend on details like what other libraries you intend to use with these things. If in doubt, default to strings. It's common for new Hy users to get into trouble by using symbols when they should be using strings; the reverse is much less common. |
Beta Was this translation helpful? Give feedback.
Either is justifiable, and keywords are a viable third option. Which is more convenient will depend on details like what other libraries you intend to use with these things. If in doubt, default to strings. It's common for new Hy users to get into trouble by using symbols when they should be using strings; the reverse is much less common.