JavaScript History, Sharp Variable for Circular Reference (via Common Lisp Reader Macro Syntax)

By Xah Lee. Date: .

JavaScript Creator Brendan Eich Borrowed Common Lisp Feature of the Number Sign Reader Macro

history js sharp variable 2025-09-26 14d5a
history js sharp variable 2025-09-26 14d5a

What is JavaScript Sharp Variable

js sharp variable 2025-09-26 0f756
js sharp variable 2025-09-26 0f756

js sharp variable 11250
js sharp variable 11250

# Brendan Eich (14 years ago) Reply View Original Go to Source

On May 26, 2011, at 1:09 PM, Michael Haufe wrote:

Is there any plan to standardize Sharp Variables or something similar?

  • https://developer.mozilla.org/en/Sharp_variables_in_JavaScript

No plans. I tried in 1998 or 1999, when TC39 was doing ES3. Rok Yu, then of Microsoft, argued against standardizing serialization since it was domain-specific and best done by libraries (unfortunately until WeakMaps in ES.next, implemented in Firefox nightlies, there has not been an efficient way to handle the join-points and cycles that sharps handle). Also, some hated the syntax.

The plan of record at Mozilla is recorded here:

The bugs must be fixed in that order, with a release in between.

The deprecation bug has an attachment,

written by Jason Orendorff, that is a self-hosted implementation of {Array,Object}.prototype.toSource. The idea is to self-host all of uneval, and provide a sharp-parsing version of eval or JSON.parse if needed. At the end of the deprecation/removal cycle, sharps would be implemented by "library code" only. No hardcoded syntax.