Re: Re: What do you think about a C# 6 like nameof() expression for

2019-06-17 Thread guest271314
> You have ignored the context from Jordan’s email (emphasis added): >> again, `Object.keys({ y })[0]` will give you the string `y`, and will survive *refactoring tools*. you can even do `function nameof(obj) { return Object.keys(obj)[0]; }` and then `nameof({ y })`. No, did not _ignore_ the

RE: Re: What do you think about a C# 6 like nameof() expression for

2019-06-17 Thread Ron Buckton
> … there'd need to be overwhelming evidence that this pattern is commonly used > enough … As it pertains to C#: https://github.com/search?l=C%23=nameof=Code. There are at least 860k uses of the `nameof` operator in C# projects on GitHub, and that’s before GitHub search gave up because there

RE: Re: What do you think about a C# 6 like nameof() expression for

2019-06-17 Thread Ron Buckton
> How is VSCode related to JavaScript? You have ignored the context from Jordan’s email (emphasis added): >> again, `Object.keys({ y })[0]` will give you the string `y`, and will >> survive refactoring tools. you can even do `function nameof(obj) { return >> Object.keys(obj)[0]; }` and then

Re: Re: What do you think about a C# 6 like nameof() expression for

2019-06-17 Thread guest271314
> In VSCode, if you rename ‘foo’ to ‘bar’ at /*1*/, you get this: How is VSCode related to JavaScript? Is the proposal really based on creating ```nameof``` in JavaScript to workaround output at a text editor? Why not file a bug with the individuals who write the code for VSCode or just write a