basilisp icon indicating copy to clipboard operation
basilisp copied to clipboard

Allow user-specified names for otherwise-munged symbol names

Open chrisrink10 opened this issue 6 years ago • 0 comments

When generating Python code, Basilisp will automatically munge symbol names which cannot be represented as Python code. For example, the Basilisp symbol <= becomes __LT____EQ__ since only the latter can be represented in Python as a symbol. However, if you plan to use that generated Python code from Python, this is pretty terrible looking. It would be great if we could generate allow def'ed symbols to specify an override like this:

(def 
  ^{:python-sym "less-than-equal"} 
  <=
  ;; ...
)

chrisrink10 avatar Aug 29 '18 13:08 chrisrink10