> Sorry, I meant to say “not entirely correct”. You have not yet confirmed if in fact the expected output is referencing a variable declared using ```const``` on the current line _before_ initialization _on the next line_.
That example appears to deviate from the purpose and usage of ```const```, beyond the scope of ```nameof```, and if were implemented, a ```ReferenceError``` should _not_ be thrown when a ```const``` variable that has yet to be initialized _on the next line_ is referred to _on the current line_? Aside from that example, the code which essentially already implements ```nameof``` should be able to be found in the code which implements ```ReferenceError``` relevant to ```const```. On Sat, Jun 15, 2019 at 10:47 PM Ron Buckton <ron.buck...@microsoft.com> wrote: > Sorry, I meant to say “not entirely correct”. > > > > *From:* Ron Buckton > *Sent:* Saturday, June 15, 2019 3:03 PM > *To:* guest271314 <guest271...@gmail.com> > *Cc:* es-discuss@mozilla.org > *Subject:* RE: Re: What do you think about a C# 6 like nameof() > expression for > > > > > At that point in the example code the identifer ```y``` does not exist. > > > > That is not entirely incorrect. The identifier `y` exists, but its binding > has not been initialized, otherwise you couldn’t refer to y in this case: > > >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss