Message from JavaScript discussions

June 2017

— Nothing outside this scope has access to the weakmap, hence private vars


Anyways, what you said makes sense, that the new keyword would not neccesarily introduce any bad things or cons.

— Although just doing closures is way easier

— It always is. More developers should take advantage of (abuse!) JS scoping rules


const createInstance = function () {
const priv = { value: 42 };
return {
digitSum () { ... }

— Just way way simpler

— Agreed

— Well what the fuck is the use-case for symbols then

— I thought the whole point was non-accessible props

— Eh, I muddled over Symbols for awhile myself. Many people come up with varying use cases which all have varying validity.

Message permanent page

— In the end, all a Symbol is, is an unknowable value. What use that is, is up to interpretation

— It is basically a UUID no one can directly observe, but can still get a reference to if it is assigned to an object

Message permanent page