Ron Buckton

Results 538 comments of Ron Buckton

C# supports something similar for user-defined destructuring: https://docs.microsoft.com/en-us/dotnet/csharp/deconstruct#deconstructing-user-defined-types. The ES equivalent of the `Person` example might be something like this (using `ref`, in place of `out`): ```js class Person {...

`const { ref x } = o;` would be analogous to `const ref x = ref o.x;`. `const ref x = o.x` would fail if `o.x` is not a `Reference`...

I don't want to use `*` or `&` due to possible conflation with pointers (and the fact that `*` is currently associated with generators in JS). Unlike in C, C++,...

> (`Symbol.toStringTag` is available on all `Object`s or at least on `Function`s too) Unfortunately, `Function.prototype` does not define `[Symbol.toStringTag]` since that would affect the `toString()` output of all class instances....

Could this not be implemented within module_wrap.cc to produce a require(esm)-specific namespace object that adds `__esModule` in a way that makes this transparent to the user?

The problem is that Object.keys only gets **own** keys. If `fullName` is an accessor it is defined on the prototype, not the instance. If you use a `for..in` loop, it...

> ```js > @freeze > class A {} > ``` @bmeck, at the last meeting I discussed this with @littledan about a solution that would work. I put together a...

I think there might be value in something like an `@conditional` decorator that the host can exercise some control over, similar to how the C# `ConditionalAttribute` behaves at compile time....

Fixed in 362f65bb66575c3b7dd83ee6a80f2313f3e84304, should be in tomorrow's build.

> > * making it highly unlikely this would be regularly abused for `defineProperty`. > > I'm not so sure, I for one would eagerly be writing a `exposeReadonly` decorator...