Hi, when I use 'repeated' keyword in protobuf messages what form should I 
use: plural or singular? 
E.g. I have message
message RealTimeMarketData
{
// client side subscription identifier
required int32 Id = 1;

// contract ID assigned by server
required int32 contractId = 2;

// new contract meta-data in case of active contract rolling 
// (subscribed symbol is now resolved to a new contract)
optional ContractMetadata contractMetadata = 3;

// Contract quotes. DOM is updated by new volumes per price. zero volume is 
used to clean this price record from DOM
repeated Quote quote = 4;
}
*How should I spell "repeated Quote quote = 4;'? Should it be "quotes" or 
"quote"? (plural or singular?)*
If I choose "repeated Quote quote" it is confusing for Javascript and 
CSharp clients e.g.

  instrument.applyQuotes(realTimeMarketData.quote);

- for method that accepts collection of quotes we pass single quote (that 
is how it looks).

If I choose "repeated Quote quotes" then in c++ I get code like this: 

Quote* pQuote = message.add_Quotes(); - while I am adding single quote.

Thanks, 

Stas

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to