Mangle symbol for JS #736
juancarlospaco
started this conversation in
Ideas
Replies: 1 comment
-
Not a good idea ?. 😅 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was wondering if
jsgen.nim
must have the "id" as the mangle for some mandatory reason ?.Because I was wondering if it can have a custom mangling only for JS,
that still random enough so it does not collide but is more human readable,
because the JS source is more frequently looked at then the C and C++ ones.
Right now
jsgen.nim
uses something like:My idea and implementation:
So given
foo
is a symbol, now it generates something likefoo_3315506830
,I was wondering if it can use something like
foo_cat420
, orfoo_cat420dog
, orfoo_123bee531
?,this
420
can be part of the "id" as it is currently, but using 3 char short words makes it more human readable.@timotheecour
Beta Was this translation helpful? Give feedback.
All reactions