"Redacted"

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

"Redacted"

kdex
I'd be interested to learn why it was decided to redact a possible new name
for `global` in the latest meeting notes[1].

Although I do understand that redacting the name minimizes its chance to gain
more usage, I doubt that the impact would be significant; if anything, I think
people would have trouble to think of this form of standardization as "open".

By the same argument, we could in principle redact any new prototype/global
property, couldn't we? Is the intent not to cause a second "smooshgate"?
What's the point?

[1] https://github.com/rwaldron/tc39-notes/blob/master/es9/2018-07/
july-24.md#new-name-for-global
_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: "Redacted"

Jordan Harband
The rationale is in the notes themselves.

Yes, we could do so in principle, but it's rarely useful to do so.

If the impact is insignificant, then we made nothing worse, just delayed some information spreading for a few weeks/months. If the impact is significant, then this has a positive effect.

I'm not seeing the downside.

On Fri, Aug 10, 2018 at 10:27 AM, kdex <[hidden email]> wrote:
I'd be interested to learn why it was decided to redact a possible new name
for `global` in the latest meeting notes[1].

Although I do understand that redacting the name minimizes its chance to gain
more usage, I doubt that the impact would be significant; if anything, I think
people would have trouble to think of this form of standardization as "open".

By the same argument, we could in principle redact any new prototype/global
property, couldn't we? Is the intent not to cause a second "smooshgate"?
What's the point?

[1] <a href="https://github.com/rwaldron/tc39-notes/blob/master/es9/2018-07/ july-24.md#new-name-for-global" rel="noreferrer" target="_blank">https://github.com/rwaldron/tc39-notes/blob/master/es9/2018-07/
july-24.md#new-name-for-global
_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss



_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss
Reply | Threaded
Open this post in threaded view
|

Re: "Redacted" global-namespace

kai zhu
+1 for unified global-object (currently stage-3)

can someone pm me what the redacted-name is?  i'm interested in polyfilling it for existing projects, e.g.:

```js
/*jslint browser*/
/*global global process*/
(function () {
/*
 * polyfill for
 * assuming redacted-name is "global2"
 */
    "use strict";
    var global2;
    try {
        global2 = process.versions.node && global;
    } catch (ignore) {
    }
    global2 = global2 || window;
    global2.global2 = global2;
}());
```


On 11 Aug 2018, at 1:29 AM, Jordan Harband <[hidden email]> wrote:

The rationale is in the notes themselves.

Yes, we could do so in principle, but it's rarely useful to do so.

If the impact is insignificant, then we made nothing worse, just delayed some information spreading for a few weeks/months. If the impact is significant, then this has a positive effect.

I'm not seeing the downside.

On Fri, Aug 10, 2018 at 10:27 AM, kdex <[hidden email]> wrote:
I'd be interested to learn why it was decided to redact a possible new name
for `global` in the latest meeting notes[1].

Although I do understand that redacting the name minimizes its chance to gain
more usage, I doubt that the impact would be significant; if anything, I think
people would have trouble to think of this form of standardization as "open".

By the same argument, we could in principle redact any new prototype/global
property, couldn't we? Is the intent not to cause a second "smooshgate"?
What's the point?

[1] https://github.com/rwaldron/tc39-notes/blob/master/es9/2018-07/
july-24.md#new-name-for-global

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss


_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss


_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss
Reply | Threaded
Open this post in threaded view
|

Re: "Redacted" global-namespace

Jordan Harband
The polyfill already exists on npm; it's linked from the proposal repo.

On Sat, Sep 29, 2018 at 5:02 AM kai zhu <[hidden email]> wrote:
+1 for unified global-object (currently stage-3)

can someone pm me what the redacted-name is?  i'm interested in polyfilling it for existing projects, e.g.:

```js
/*jslint browser*/
/*global global process*/
(function () {
/*
 * polyfill for
 * assuming redacted-name is "global2"
 */
    "use strict";
    var global2;
    try {
        global2 = process.versions.node && global;
    } catch (ignore) {
    }
    global2 = global2 || window;
    global2.global2 = global2;
}());
```


On 11 Aug 2018, at 1:29 AM, Jordan Harband <[hidden email]> wrote:

The rationale is in the notes themselves.

Yes, we could do so in principle, but it's rarely useful to do so.

If the impact is insignificant, then we made nothing worse, just delayed some information spreading for a few weeks/months. If the impact is significant, then this has a positive effect.

I'm not seeing the downside.

On Fri, Aug 10, 2018 at 10:27 AM, kdex <[hidden email]> wrote:
I'd be interested to learn why it was decided to redact a possible new name
for `global` in the latest meeting notes[1].

Although I do understand that redacting the name minimizes its chance to gain
more usage, I doubt that the impact would be significant; if anything, I think
people would have trouble to think of this form of standardization as "open".

By the same argument, we could in principle redact any new prototype/global
property, couldn't we? Is the intent not to cause a second "smooshgate"?
What's the point?

[1] https://github.com/rwaldron/tc39-notes/blob/master/es9/2018-07/
july-24.md#new-name-for-global

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss


_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss


_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss
Reply | Threaded
Open this post in threaded view
|

Re: "Redacted" global-namespace

kai zhu
thx. for those too lazy, i translated the npm-package into a standalone-snippet you can copy-paste anywhere:

```js
/*jslint browser*/
/*global global global2 self*/
(function () {
/*
 * polyfill for
 * 1. replace all occurrences of global2 with <redacted-name>
 * 2. copy-paste this code into any browser/node/io.js/node-webkit script
 *    to enable global-object global2
 */
    "use strict";
    var descriptor;
    var obj;
    var polyfill;
    if (
        typeof global !== "object"
        || !global
        || global.Math !== Math
        || global.Array !== Array
    ) {
        if (String(typeof self) !== "undefined") {
            polyfill = self;
        } else if (String(typeof window) !== "undefined") {
            polyfill = window;
        } else if (String(typeof global) !== "undefined") {
            polyfill = global;
        } else {
            polyfill = Function('return this')(); // jslint ignore:line
        }
    } else {
        polyfill = global;
    }
    if (Object.defineProperty && (function () {
        obj = {};
        try {
            Object.defineProperty(obj, "x", {enumerable: false, value: obj});
/* jslint ignore:start */
            for (var _ in obj) {
                return false;
            }
/* jslint ignore:end */
            return obj.x === obj;
        } catch (ignore) { /* this is IE 8. */
            return false;
        }
    }())) {
        descriptor = Object.getOwnPropertyDescriptor(polyfill, "global2");
        if (!descriptor || (
            descriptor.configurable
            && (descriptor.enumerable || descriptor.writable || global2 !== polyfill)
        )) {
            Object.defineProperty(polyfill, "global2", {
                configurable: true,
                enumerable: false,
                value: polyfill,
                writable: false
            });
        }
    } else if (typeof global2 !== "object" || global2 !== polyfill) {
        polyfill.global2 = polyfill;
    }
}());
```


On 30 Sep 2018, at 4:16 AM, Jordan Harband <[hidden email]> wrote:

The polyfill already exists on npm; it's linked from the proposal repo.

On Sat, Sep 29, 2018 at 5:02 AM kai zhu <[hidden email]> wrote:
+1 for unified global-object (currently stage-3)

can someone pm me what the redacted-name is?  i'm interested in polyfilling it for existing projects, e.g.:

```js
/*jslint browser*/
/*global global process*/
(function () {
/*
 * polyfill for
 * assuming redacted-name is "global2"
 */
    "use strict";
    var global2;
    try {
        global2 = process.versions.node && global;
    } catch (ignore) {
    }
    global2 = global2 || window;
    global2.global2 = global2;
}());
```


On 11 Aug 2018, at 1:29 AM, Jordan Harband <[hidden email]> wrote:

The rationale is in the notes themselves.

Yes, we could do so in principle, but it's rarely useful to do so.

If the impact is insignificant, then we made nothing worse, just delayed some information spreading for a few weeks/months. If the impact is significant, then this has a positive effect.

I'm not seeing the downside.

On Fri, Aug 10, 2018 at 10:27 AM, kdex <[hidden email]> wrote:
I'd be interested to learn why it was decided to redact a possible new name
for `global` in the latest meeting notes[1].

Although I do understand that redacting the name minimizes its chance to gain
more usage, I doubt that the impact would be significant; if anything, I think
people would have trouble to think of this form of standardization as "open".

By the same argument, we could in principle redact any new prototype/global
property, couldn't we? Is the intent not to cause a second "smooshgate"?
What's the point?

[1] https://github.com/rwaldron/tc39-notes/blob/master/es9/2018-07/
july-24.md#new-name-for-global

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss


_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss



_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss