How about using /// for those special line comments?
This would prevent accidental field comments.

Joern.

On 22.12.2009, at 17:12, Henner Zeller wrote:

> Hi,
> On Tue, Dec 22, 2009 at 06:42, Christopher Piggott <cpigg...@gmail.com> wrote:
>> Hmm maybe I can use the "UninterpretedOption" message to do this.
>> Would something like this work?
>> 
>> message ChrisMessage {
>> option javadoc = "This is an object representing Chris's Message";
>> repeated int32 field1 = 1 [javadoc="This is a javadoc for field 1];
>> repeated int32 field2 = 2 [javadoc="This is a javadoc for field 2];
>> }
>> 
> 
> This javadoc option looks too much of a clutter to me and decreases
> the readability of the proto file.
> 
> I'd rather have the protoc compiler understand regular JavaDoc like
> comments that make it into the meta data - from there the
> corresponding language specific comments can be generated.
> 
> My suggestion is to support two types of comments. One in front of the
> field or message, potentially multiline and starting with
> slash-doublestar, much like JavaDoc
> 
> /** This is some field doc
>  *  that could potentially span multiple
>  *  lines
>  */
> repeated int32 field1 = 1;
> 
> .. and a end-of-line comment that is on the same line of a field
> declaration to save space:
> 
> repeated int32 field2 = 2;  // some field doc describing field in same line.
> 
> (this is what is missing from standard JavaDoc and makes field
> comments there 100% more space consuming )
> 
> Both of these can be unambiguously associated with the corresponding
> fields. I have a low prioritized entry on my personal TODO list to add
> at some point, but I am happy if someone else wants to work on this ;)
> 
> -h
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "Protocol Buffers" group.
> To post to this group, send email to proto...@googlegroups.com.
> To unsubscribe from this group, send email to 
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/protobuf?hl=en.
> 
> 

--

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.


Reply via email to