00:09
<ptomato>
FWIW, looking at the version with the outer keyword in your notes, I do indeed find it more intuitively readable than the [#x] version even though I didn't find that confusing either
08:05
<nicolo-ribaudo>
using #x
13:31
<peetk>
fr tho declare #x
14:01
<Ashley Claymore>

I personally prefer declare #x.

Yes 'declare' is already in TypeScript with different semantics. But so is private.
And the reason you declare something in TypeScript is so that you can access it in that scope, which is what this is doing.
And private #x to me feels weird as it implies that other visibility levels are supported, and I don't think we would? Or if we did it would more likely be something like export #x.
And # already means private, so it reads like 'private private x' to me.

14:02
<Ashley Claymore>
that said, I can live with private #x too!
14:13
<rbuckton>

I personally prefer declare #x.

Yes 'declare' is already in TypeScript with different semantics. But so is private.
And the reason you declare something in TypeScript is so that you can access it in that scope, which is what this is doing.
And private #x to me feels weird as it implies that other visibility levels are supported, and I don't think we would? Or if we did it would more likely be something like export #x.
And # already means private, so it reads like 'private private x' to me.

declare x; at the field level already exists as well, so that would be very confusing
14:29
<Ashley Claymore>
I agree that it's not free of confusion. I just think that similar arguments can be made of private #x too.
14:31
<Ashley Claymore>
In terms of what the statement is doing, it is declaring the private symbol. It's not making something private that would otherwise be public
16:21
<bakkot>
strictly speaking, let #x is viable
16:21
<bakkot>
but... I think not that
16:40
<bakkot>
ljharb or someone, can you give me maintainer access to https://github.com/tc39/proposal-private-declarations/ now that I guess I am championing it?
16:43
<ljharb>
done
16:45
<ljharb>
(ftr i kind of like "declare" also)
16:45
<Michael Ficarra>
@bakkot please also send a PR to tc39/proposals to update the listed champions
17:39
<hax (HE Shi-Jun)>
In extension proposal, I introduced const ::x (though I plan to remove it), it's very close to the usage of private #x. So maybe const #x ๐Ÿ˜‰
And if we eventually have reified private name, I guess it could be const #x = PrivateName()
17:43
<bakkot>
const would be better than let at least, yes
17:43
<bakkot>
honestly kinda coming around to declare; it's actually pretty close to how TS uses it, just in a different space
17:44
<bakkot>
"introduce a name you can refer to later, but not a variable"
17:48
<hax (HE Shi-Jun)>
I think declare is not good, because I always feel ts usage of declare have the meaning much close to extern in other languages ๐Ÿคจ
17:56
<bakkot>
fair point