Ron Buckton
Ron Buckton
You would need much more complex syntax to determine how you perform your mapping. If its just calling your _EnumValueMap_ function with the SV of the name and the value,...
Also, the `extends` syntax is somewhat similar to C# enums: ```csharp enum Colors: int { ... } enum Colors: ushort { ... } ```
With the current proposal, the result of `typeof (0, Enum.foo)` would still be `"enum"`. Its not until you do something like `typeof Enum.foo !== typeof (Enum.foo + 0)` where it...
@rwaldron, @ljharb, @bterlson: What do you think about the changes in #2?
> When `Enum.foo` is a string but typeof enum, what would `String.prototype.valueOf.call(Enum.foo)` do? (i'd expect either Enum.foo is an object boxing a string, or else it'd have to throw) @ljharb...
The enum design in this proposal is bidirectional, but requires the use of an enum [API](https://github.com/rbuckton/proposal-enum#api) to accomplish this. Having an external API is more reliable for string-valued enums like...
cc: @rwaldron, @Jack-Works
> What I don't see here is a clear explainer for what an ADT enum _is_ (beyond just the initialism expansion), and why it's important to have that feature in...
I haven't considered changing the license, no. You may want to check out https://esfx.js.org/#async, which is a more modular version of these async coordination primitives and is more up-to-date.
If we stick with the `enum` primitive type, then I imagine `String.prototype.toString.call(Colors.red)` would throw (assuming `enum Colors { Red = "Red", ... }`), since its neither a String nor an...