05:39
<Richard Gibson>
I'm assuming you're referring to duplicating subtags (cf. RFC 5646 § 2.1), in which case the answer is "it depends". Duplication never violates syntactic well-formedness, but duplicate language variant subtags and duplicate singleton subtags are always rejected per IsStructurallyValidLanguageTag and UTS #35 § 3.2 and § 3.4. Duplicate UTS #35 "u" extension attribute and keyword subtags are permitted by ECMA-402, but UnicodeExtensionComponents ensures that only the first instance of any given attribute or keyword key in a locale identifier is preserved.
05:41
<snek>
interesting
05:41
<snek>
so an engine shouldn't throw on something like `en-US-u-hc-h23-hc-h11`
05:42
<snek>
it should just consider it as if the 2nd one doesn't exist
07:16
<sirisian>
The awkwardness is why https://github.com/tc39/proposal-decorator-metadata exists
Oh so that's where metadata went. That doesn't even give you a reference to the class. They just have a metdataKey. Strange.
07:28
<littledan>
Oh so that's where metadata went. That doesn't even give you a reference to the class. They just have a metdataKey. Strange.
Yes this limitation is very much the point. Would it hurt your application?
07:29
<sirisian>
No, the metadataKey is sufficient for serialization tasks, which are the use cases I've been looking at.
07:33
<littledan>
It might help the proposal authors advance if you document your use case, eg in an issue
07:34
<sirisian>
I've been writing examples introducing template generics though, and having access to the class is useful. Was hoping that proposal would give me ideas. Sadly C++ doesn't have such concepts either.
07:36
<littledan>
One reason the class is hidden is because, if it were exposed, you would be seeing a partially initialized class, and the engine would be forced to be modifying it step by step as opposed to building it based on the result of that operation. ES6 computed property names don’t see the class either, similarly.
07:39
<sirisian>
Not sure I fully understand. What happens if you call a static function in the class in the decorator? Does it not exist?
07:44
<sirisian>
It does make sense for the computed property. I get that one. I never considered when decorators run. I thought it was like after the properties were defined.