Katelyn Gadd wrote:
Has the C# approach to namespace extension been considered at all?
Yes. ES4 has namespaces, after Common Lisp symbol packages.
Scoped object extensions were proposed four years ago for ES6, but
foundered on the same thing that killed ES4 namespaces: adding a second
lookup parameter besides property name. See
https://esdiscuss.org/topic/may-24-26-rough-meeting-notes (search for
"Scoped Object Extensions:" after picking "View Original" from the
in-page toolbar), and then see
https://esdiscuss.org/topic/scoped-binding-of-a-method-to-an-object#content-48
from last year, where Andreas Rossberg wrote:
"My take-away was that scoped extension methods are only bearable in a
language with a static, nominal class system (like C#), where the
additional lookup dimension can be resolved at compile time."
/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss