Skip to content

Why use invisible unicode character u+200d(zero-width joiner)? #1726

Answered by kriskowal
Garfield550 asked this question in Q&A
Discussion options

You must be logged in to vote

The module to program translation works only if none of the free variables of the module collide with these names that the calling convention introduces into their scope. It is our hope that no real modules are incompatible with the ses shim because they were bound to these names in global scope.

JavaScript borrowed the idea of allowing generated code to include $ in compiler-generated names from Java. jQuery ensured that we would never be able to rely on the glyphs’s specialness for the intended purpose. Using an invisible code point at least minimizes the displacement of column numbers when debugging.

These choices may have been extreme.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dckc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants