Reflect.create()

even stensberg evenstensberg at gmail.com
Thu May 26 20:41:48 UTC 2016


Hi Bergi!

If you read the description, it clearly says unofficial proposal, of which
draft means a mock-up for improvement. I thought that was retorical enough
for people to understand, I'll change that up.

Wierd. Was having this discussion / pep-talk with Brendan Eich and think he
understood that fairly.(
https://twitter.com/ev1stensberg/status/722180638971936768)


About lack of answer in the reason, you should read the Medium article
again, and reconsider what I said about ambiguously written code. I think
it provides a clear intent, of which we want to avoid re-writing an
assignment in order to use the logical OR.

I advice you to read this on MDN
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect>
which
explains what I mean about "not an object" . ( It's a built-in object)
Where you need to assign it through a object assignment. And yea, the name
was intentional. What makes this somewhat similar to `Object.create` is
that we create an logical instance, but not an actual object like
`Object.create` does. If you look at the issue tracker I want this to be
viable with AND operators as well, so change of name is something I'd be up
for! ( Also, if you got a proposal, I'd like to hear).

Is there anything else I missed?

Even

On Thu, May 26, 2016 at 10:21 PM, Bergi <a.d.bergi at web.de> wrote:

> even stensberg wrote:
>
> I wrote up a draft about how I'd like this to look at:
>> https://github.com/ev1stensberg/proposal-reflect-or
>>
>
> I'm sorry for the harsh tone, but that's not a draft.
>
> I tried to read [your medium post](
> https://medium.com/@ev1stensberg/iteration-in-javascript-needs-a-tectonic-shift-a74b6554bbd7)
> but failed to understand anything (and didn't get any point you were going
> to make). As such, the "Reason" for this proposal is completely missing to
> me.
>
> While I fail to understand what your proposal is all about, it seems to
> have something to do with defaulting values. And great, you've even asked
> the question "How is this different to Default Param in ES6 / the OR
> operator?" yourself in that text - but there is no answer?!
>
> The next thing that completely escaped me is your API description
>
> | `Reflect.create(target, value, [DefaultValue])`
> |
> | Creates a Reflect, which is not an object.
>
> Uh, what? What is "a Reflect"?
>
>
> And the first thing that came to my mind after I read what you're talking
> about is that you should rename the proposal. `Reflect.create` will remind
> everyone of `Object.create` (given that some of the methods are duplicated
> between `Object` and `Reflect`) and one would expect that they do the same
> or at least have a similar purpose.
> You seem to be proposing something completly different that has nothing to
> do with creation.
>
> Kind regards,
>  Bergi
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160526/2cd11317/attachment.html>


More information about the es-discuss mailing list