There's something that's been nagging me about the <| operator ever since I first saw it. With the recent discussion (yet again) of a possible alternative syntax, I've been thinking a lot about it, and I think I've finally figured out what really bugs me (beyond the syntax itself).
The <| operator was born out of a few different use cases coming together (as listed in the proposal):
- Specifying an explicit [[Prototype]] for object literals
- Specifying an explicit [[Prototype]] for array literals
- “Subclassing” arrays
- Setting the prototype of a function to something other than Function.prototype
- Implementing class-like parallel constructor and instance prototype inheritance chains.
- Setting the prototype of RegExp and other built-in objects.