W3C home > Mailing lists > Public > public-xg-htmlspeech@w3.org > April 2011

Re: Javascript examples in draft not technically correct

From: Bjorn Bringert <bringert@google.com>
Date: Fri, 1 Apr 2011 13:28:37 +0100
Message-ID: <BANLkTini+f+QXb7mS1BbAqdXwOShcK_Fdg@mail.gmail.com>
To: Brook Monroe <brook.monroe@gmail.com>
Cc: public-xg-htmlspeech@w3.org
Hi Brook,

How would you like to change the examples? There are some variable
declarations that aren't at the top of the enclosing method. While
that can be a bit confusing given JavaScript's variable scoping, it's
not really an error as far as I know.

/Bjorn

On Mon, Mar 28, 2011 at 3:13 AM, Brook Monroe <brook.monroe@gmail.com> wrote:
> To Whom It May Concern:
>
> The Javascript examples in 18 OCT 2010 draft of the Speech Input API
> specification appear to have been based on the idea that variables are block
> scoped in Javascript.  They are not.  Javascript is a function-scoped
> language like C.  While the script as supplied will work due to the leniency
> of the extant interpreters, the examples should be re-written to be correct.
>
> Best regards,
>
> J. Brook Monroe
> Travel Solutions Custom Solution Architect, NCR
>
>
>



-- 
Bjorn Bringert
Google UK Limited, Registered Office: Belgrave House, 76 Buckingham
Palace Road, London, SW1W 9TQ
Registered in England Number: 3977902
Received on Friday, 1 April 2011 12:29:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 1 April 2011 12:29:08 GMT