guest271314 (2019-06-16T00:14:55.000Z)
guest271314 at gmail.com (2019-06-16T01:09:25.961Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. ```MapInstance.get("key")``` For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` // NAMEOF is always dynamic list of let, const declarations in current scope console.log(NAMEOF); // ["x", "y"]; [{name:"x", line:5}, {name:"y", line:7}] // should resolve be in the list even if not declared using const or let? await new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * 1000))); const x = nameof y await new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * 1000))); const y = 1; ```
guest271314 at gmail.com (2019-06-16T01:09:07.124Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. ```MapInstance.get("key")``` For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` // NAMEOF is always dynamic list of let, const declarations in current scope console.log(NAMEOF); // ["x", "y"]; [{name:"x", line:35}, {name:"y", line:7}] // should resolve be in the list even if not declared using const or let? await new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * 1000))); const x = nameof y await new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * 1000))); const y = 1; ```
guest271314 at gmail.com (2019-06-16T01:08:15.141Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. ```MapInstance.get("key")``` For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` // NAMEOF is always dynamic list of let, const declarations in current scope console.log(NAMEOF); // ["x", "y"]; [{name:"x", line:3}, {name:"y", line:4}] // should resolve be in the list even if not declared using const or let? await new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * 1000))); const x = nameof y await new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * 1000))); const y = 1; ```
guest271314 at gmail.com (2019-06-16T01:07:35.514Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. ```MapInstance.get("key")``` For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` // NAMEOF is always dynamic list of let, const declarations in current scope console.log(NAMEOF); // ["x", "y"]; [{name:"x", line:3}, {name:"y", line:4}] await new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * 1000))); // should resolve be in the list? const x = nameof y await new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * 1000))); const y = 1; ```
guest271314 at gmail.com (2019-06-16T01:06:09.965Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. ```MapInstance.get("key")``` For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` // NAMEOF is always dynamic list of let, const declarations in current scope console.log(NAMEOF); // ["x", "y"]; [{name:"x", line:3}, {name:"y", line:4}] await new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * 1000))); const x = nameof y await new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * 1000))); const y = 1; ```
guest271314 at gmail.com (2019-06-16T01:03:52.578Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. ```MapInstance.get("key")``` For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` // NAMEOF is always dynamic list of let, const declarations in current scope console.log(NAMEOF); // ["x", "y"]; [{name:"x", line:2}, {name:"y", line:3}] const x = nameof y const y = 1; ```
guest271314 at gmail.com (2019-06-16T01:01:12.334Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. ```MapInstance.get("key")``` For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` // NAMEOF is always dynamic list of let, const declarations in current scope console.log(NAMEOF); // ["x", "y"]; [{name:"x", line:2}, {name:"y", line:3}] const x = nameof y const y = 1; // (NAMEOFALL: any, all scopes; TODO what happens when duplicates are encountered?) ```
guest271314 at gmail.com (2019-06-16T01:00:41.809Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. ```MapInstance.get("key")``` For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` // NAMEOF is always dynamic list of let, const declarations in current scope console.log(NAMEOF); // ["x", "y"]; [{name:"x", line:1}, {name:"y", line:2}] const x = nameof y const y = 1; // (NAMEOFALL: any, all scopes; TODO what happens when duplicates are encountered?) ```
guest271314 at gmail.com (2019-06-16T00:59:30.031Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. ```MapInstance.get("key")``` For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` const x = nameof y const y = 1; console.log(NAMEOF); // ["x", "y"]; [{name:"x", line:1}, {name:"y", line:2}] // NAMEOF is always dynamic list of let, const declarations in current scope // (NAMEOFALL: any, all scopes; TODO what happens when duplicates are encountered?) ```
guest271314 at gmail.com (2019-06-16T00:55:53.883Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. ```MapInstance.get("key")``` For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` const x = nameof y const y = 1; console.log(NAMEOF); // ["y", "y"]; // NAMEOF is always dynamic list of let, const declarations in current scope // (NAMEOFALL: any, all scopes; TODO what happens when duplicates are encountered?) ```
guest271314 at gmail.com (2019-06-16T00:55:14.979Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. ```MapInstance.get("key")``` For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` const x = nameof y const y = 1; console.log(NAMEOF); // ["y", "y"]; NAMEOF is always dynamic list of let, const declarations in current scope (NAMEOFALL: any, all scopes; TODO what happens when duplicates are encountered?) ```
guest271314 at gmail.com (2019-06-16T00:53:04.600Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` const x = nameof y const y = 1; console.log(NAMEOF); // ["y", "y"]; NAMEOF is always dynamic list of let, const declarations in current scope (NAMEOFALL: any, all scopes; TODO what happens when duplicates are encountered?) ```
guest271314 at gmail.com (2019-06-16T00:52:16.080Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value. For the purposes of ```nameof``` as descibed in this proposal a ```Set``` might suffice ``` const x = nameof y const y = 1; console.log(NAMEOF); // ["y", "y"]; NAMEOF is always dynamic list of let, const declarations in current scope (SUPERNAMEOF: any, all scopes; TODO what happens when duplicates are encountered?) ```
guest271314 at gmail.com (2019-06-16T00:36:46.956Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (handle variables not set at ```Map```, if allowed, based on requirement). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value.
guest271314 at gmail.com (2019-06-16T00:35:28.024Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (else throw error if that is requirement?). Which would remedy using ```const``` and ```let``` or ```var``` at all - all variables are set at a ```Map``` immediately having a unique name and a value.
guest271314 at gmail.com (2019-06-16T00:33:38.757Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any and all declared variables in any scope could be set at a ```Map``` object with key, value pair being name, value (else throw error if that is requirement?).
guest271314 at gmail.com (2019-06-16T00:31:24.462Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope? Taking the proposal a step further, any declared variable in any scope could be set at a ```Map``` object with key, value pair being name, value.
guest271314 at gmail.com (2019-06-16T00:23:58.189Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization? Since some human _has_ to write ```const``` and ```let``` and _choose_ the variable name, why cannot the same human write the variable name as a string and maintain a map of all variable names in each required scope?
guest271314 at gmail.com (2019-06-16T00:20:14.610Z)
What is the use case for ```nameof``` being used as a lookahead _before_ variable initialization?
guest271314 at gmail.com (2019-06-16T00:19:26.214Z)
What is the use case for ```nameof``` being used _before_ variable initialization?