- From: Satish S <satish@google.com>
- Date: Tue, 15 Nov 2011 09:48:20 +0000
- To: Michael Bodell <mbodell@microsoft.com>
- Cc: Dan Burnett <dburnett@voxeo.com>, "public-xg-htmlspeech@w3.org" <public-xg-htmlspeech@w3.org>
- Message-ID: <CAHZf7RmNxzrJ1Poa6YT0k5rqLyjc34Tf4_r=hgzS5MPwdVOSUg@mail.gmail.com>
Yes it is somewhat longer, but makes it clear when you look at add, remove,
modify methods as a whole unit. Having add methods in one interface whereas
directly accessing the array/collection to remove or modify seems misplaced.
Cheers
Satish
On Tue, Nov 15, 2011 at 2:26 AM, Michael Bodell <mbodell@microsoft.com>wrote:
> Yeah, I’m not sold on moving the functions to the collection. I’m not
> sold on not doing it either. It is pretty late in the game to make
> contentful changes so we should definitely be sure exactly what we want
> before we make such a change. If it is on the collection then you’ll write
> code that looks like:****
>
> ** **
>
> var sr = new SpeechReco();****
>
> sr.grammars.addGrammarUri(“https://example.org/myGrammar.srgs”, 2.0);****
>
> ** **
>
> whereas without the change you’d have:****
>
> ** **
>
> var sr = new SpeechReco();****
>
> sr.addGrammarUri(“https://example.org/myGrammar.srgs”, 2.0);****
>
> ** **
>
> I know the second one is shorter, and that appeals to me. I suppose we
> could do the first one and change the name to addFromUri instead of
> addGrammarUri and then you’d get:****
>
> ** **
>
> var sr = new SpeechReco();****
>
> sr.grammars.addFromUri(“https://example.org/myGrammar.srgs”, 2.0);****
>
> ** **
>
> which maybe doesn’t have quite as much repetition, but is still longer.***
> *
>
> ** **
>
> I guess for me it comes back to does it matter enough that we do want to
> change this 3 days before our last conference call?****
>
> ** **
>
> *From:* Dan Burnett [mailto:dburnett@voxeo.com]
> *Sent:* Saturday, November 12, 2011 9:59 PM
> *To:* Satish S
> *Cc:* public-xg-htmlspeech@w3.org
> *Subject:* Re: updated final report draft****
>
> ** **
>
> Actually, I didn't notice that you had moved the addGrammar* methods onto
> the new collection object itself. I agree that we need a new object for
> the collection and will do that, but I want to hear from others before I
> move the addGrammar* methods into that collection from the SpeechReco
> object/interface.****
>
> ** **
>
> -- dan****
>
> ** **
>
> On Nov 13, 2011, at 12:53 AM, Dan Burnett wrote:****
>
>
>
> ****
>
> Agreed. I will apply this change when I convert the arrays to collections
> throughout.****
>
> ** **
>
> -- dan****
>
> ** **
>
> On Nov 11, 2011, at 9:30 AM, Satish S wrote:****
>
>
>
> ****
>
> o API Issue 5 (http://bantha.org/~mbodell/speechxg/issuew5.html):
> Brought back the grammar/parameter functions. This involved uncommenting
> the functions/explanations, adding a new one for grammarString, and
> renaming and rewording appropriately.****
>
> ** **
>
> A minor/cosmetic suggestion - it would be cleaner to have a separate
> interface. See http://www.w3.org/TR/domcore/#domtokenlist for inspiration.
> ****
>
> ** **
>
> interface SpeechGrammar {****
>
> attribute DOMString src;****
>
> attribute float weight;****
>
> };****
>
> ** **
>
> interface SpeechGrammarList {****
>
> readonly attribute unsigned long length;****
>
> getter SpeechGrammar item(unsigned long index);****
>
> void addGrammarUri(in DOMString src, optional float weight);****
>
> void addGrammarString(in DOMString string, optional float weight);
> ****
>
> }****
>
> ** **
>
> interface SpeechReco {****
>
> SpeechGrammarList grammars;****
>
> ...****
>
> }****
>
> ** **
>
> --****
>
> Cheers****
>
> Satish****
>
> ** **
>
> ** **
>
Received on Tuesday, 15 November 2011 09:48:59 UTC