guest271314 (2019-06-15T22:26:20.000Z)
guest271314 at gmail.com (2019-06-15T22:45:00.607Z)
``` const f = () => y; let y = 1; ``` is different (dissimilar) code from the original example code referenced ``` const x = nameof y; // "y" const y = 1; ``` How is that example related to the ```nameof``` proposal? Does that example seek to extend referencing ```const``` declarations _before_ the initialization? Or, can that example be set aside? Can you kindly clarify how that example is different from attempting to reference a ```const``` variable before initialization (which would, at the outset, be more than simply a ```nameof``` operator)? > I don’t disagree that there are “alternative approaches” to ‘nameof’ for many cases, but they all incur overhead. What overhead is incurred by the approach using ```const```, ```try..catch``` and ```ReferenceError```? Given that a ```ReferenceError``` is thrown _now_ when attempting to reference a variable declared using ```const``` before initialization where the ```message``` property _includes the name of the variable_, either the specification now defines to do so, and, or, the implementers are already getting the name of the idetifier as a string and outputting the expected result of ```nameof``` (identifier name) in a similar context. Thus, the code already exists and is already being implemented at ```ReferenceError```. It would appear it is now a matter of locating that source code in browser implementations and abstracting the process to a ```nameof``` function. Therefore, from the point of view of what potentially already exists in specification and, or is already implemented in browsers, ```nameof``` as a standalone function or operator does not appear to be outside of the scope of what browsers are already doing. Abstracting ```nameof``` to a standalone function should be possible - using what already exists. Have you looked into the source code of browsers that implement ```const``` to determine the issues, if any, as to utilizing the existiing implementation(s) of ```ReferenceError``` to facilitate ```nameof``` while avoiding incurring the described "overhead" of using workarounds to achieve the same output?
guest271314 at gmail.com (2019-06-15T22:33:10.271Z)
``` const f = () => y; let y = 1; ``` is different (dissimilar) code from the original example code referenced ``` const x = nameof y; // "y" const y = 1; ``` > I don’t disagree that there are “alternative approaches” to ‘nameof’ for many cases, but they all incur overhead. What overhead is incurred by the approach using ```const```, ```try..catch``` and ```ReferenceError```? Given that a ```ReferenceError``` is thrown _now_ when attempting to reference a variable declared using ```const``` before initialization where the ```message``` property _includes the name of the variable_, either the specification and, or the implementers are already getting the name of the idetifier as a string and outputing the described requirement of ```nameof``` in a similar context. Thus, the code already exists. It would appear it is now a matter of locating that source code in browser implementations and abstracting the process to a ```nameof``` function or operator. Have you looked into the source code of browsers that implement ```const``` to determine the issues, if any, as to utilizing the existiing implementation(s) of ```ReferenceError``` to facilitate ```nameof``` while avoiding incurring the described "overhead" of using workarounds to achieve the same output?
guest271314 at gmail.com (2019-06-15T22:30:38.405Z)
``` const f = () => y; let y = 1; ``` is different (dissimilar) code from the original example code referenced ``` const x = nameof y; // "y" const y = 1; ``` > I don’t disagree that there are “alternative approaches” to ‘nameof’ for many cases, but they all incur overhead. What overhead is incurred by the approach using ```const```, ```try..catch``` and ```ReferenceError```? Given that a ```ReferenceError``` is thrown when attempting to reference a variable declared using ```const``` before initialization where the ```message``` property includes the name of the variable, either the specification and, or the implementers are already getting the name of the idetifier as a string and outputing the described requirement of ```nameof``` in a similar context. Thus, the code already exists. It would appear it is now a matter of locating that source code in browser implementations and abstracting the process to a ```nameof``` function or operator. Have you looked into the source code of browsers that implement ```const``` to determine the issues, if any, as to utilizing the existiing implementation(s) of ```ReferenceError``` to facilitate ```nameof``` while avoiding incurring the described "overhead" of using workarounds to achieve the same output?
guest271314 at gmail.com (2019-06-15T22:29:10.281Z)
``` const f = () => y; let y = 1; ``` is different (dissimilar) code than the original reference example code. > I don’t disagree that there are “alternative approaches” to ‘nameof’ for many cases, but they all incur overhead. What overhead is incurred by the approach using ```const```, ```try..catch``` and ```ReferenceError```? Given that a ```ReferenceError``` is thrown when attempting to reference a variable declared using ```const``` before initialization where the ```message``` property includes the name of the variable, either the specification and, or the implementers are already getting the name of the idetifier as a string and outputing the described requirement of ```nameof``` in a similar context. Thus, the code already exists. It would appear it is now a matter of locating that source code in browser implementations and abstracting the process to a ```nameof``` function or operator. Have you looked into the source code of browsers that implement ```const``` to determine the issues, if any, as to utilizing the existiing implementation(s) of ```ReferenceError``` to facilitate ```nameof``` while avoiding incurring the described "overhead" of using workarounds to achieve the same output?
guest271314 at gmail.com (2019-06-15T22:28:18.859Z)
``` const f = () => y; let y = 1; ``` is different (dissimilar) code than the original reference example code. > I don’t disagree that there are “alternative approaches” to ‘nameof’ for many cases, but they all incur overhead. What overhead is incurred by the approach using ```const```, ```try..catch``` and ```ReferenceError```? Given that a ```ReferenceError``` is thrown when attempting to reference a variable declared using ```const``` where the ```message``` property includes the name of the variable, either the specification and, or the implementers are already getting the name of the idetifier as a string and outputing the described requirement of ```nameof``` in a similar context. Thus, the code already exists. It would appear it is now a matter of locating that source code in browser implementations and abstracting the process to a ```nameof``` function or operator. Have you looked into the source code of browsers that implement ```const``` to determine the issues, if any, as to utilizing the existiing implementation(s) of ```ReferenceError``` to facilitate ```nameof``` while avoiding incurring the described "overhead" of using workarounds to achieve the same output?