Closed GrosSacASac closed 7 years ago
That one is taken by private fields, and doesn't connote "optional" in any way imo.
I agree with @ljharb.
I prefer a?.b?.c
rather than a#b#c
. It has a more explicit syntax for optionnal and it is comparable to other languages.
Since it's used by private fiels, in case you write this.#a
there would be no way to make the difference.
#
is commonly used to denote instance methods.
Swapping #
for @
between decorators and private fields (which would have addressed "denote instance methods") was rejected by TC39.
The ?.
token is one of the most commonly used token amongst different languages for that purpose. Why do you want to use another symbol?
I was considering the note
@GrosSacASac I'm not sure I follow. What note are you referring to, specifically? Or are you asking for one in which an alternate possible syntax is proposed?
Swapping # for @ between decorators and private fields (which would have addressed "denote instance methods") was rejected by TC39.
@ljharb Well at least it's object.#a
and not object#a
.
in the readme, would it be a good idea to use another symbol, other than
?.
? maybe this one#