Ranando D Washington-King
Ranando D Washington-King
It's still a problem. File: foo.js ```js 'lang sweet.js' import { unwrap } from '@sweet-js/helpers' for syntax; export syntax foo = (ctx) => { console.log(`unwrap = ${typeof(unwrap)}`); return #`let x;`;...
Here's my 2 cents on this in code form: ```js class Point2D { const POLAR = Symbol(); const XY = Symbol(); let x = 0; let y = 0; function...
@zenparsing > The "closure" answer would be that we can use the surrounding scope for "private static" stuff Would that work? A problem with your example is that since the...
I see what you're doing, but that's module level. If multiple classes were defined in the same module, they would all share access to variables that are supposed to be...
@zenparsing Looking back over your arguments again: > First, since we would have two ways to define "functiony" things inside of the class body it might be a little confusing...
From above, a rewrite: ```js class Point2D { const POLAR = Symbol(); const XY = Symbol(); let x = 0; let y = 0; //This private method is now... let...
After re-thinking private functions, the static picture looks a little different to me now. How about this? ```js class Ex { /* I don't like public data properties, but... */...
@ljharb Why have a public data member if the only thing you're going to do is read it? Declaring a constant internal variable is good for cases where certain values...
> Nothing is better handled by a getter imo That's one of the reasons why I apply the rule of "minimum opinionation". If I keep things as un-opinionated as possible,...
@ljharb Working on the previous post made me think of something. Is there a single term describing the collection of all things that can access or are in the private...