[
https://issues.apache.org/jira/browse/THRIFT-5032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16982265#comment-16982265
]
Paulo Neves commented on THRIFT-5032:
-------------------------------------
[~jensg]: I get your point and I also do not like much the guidelines, but the
problem is that the thrift compiler does the worse of both worlds before my
patch. You can see this in my patch of the Client test:
{code:java}
- var thing = nest.Struct_thing;
+ var thing = nest.StructThing;
{code}
What the current version of thrift does is, when you have a StructThing in the
.thrift file it actually generates properties like Struct_thing. This is
different than what you expected as struct_thing and is different than
StructThing which is the guidelines. This was the reason I followed the
guidelines at all. As I am a C++ programmer I am also fond of using var_b
instead of VarB, but thrift does none.
> Allows PascalCase properties for netstd
> ---------------------------------------
>
> Key: THRIFT-5032
> URL: https://issues.apache.org/jira/browse/THRIFT-5032
> Project: Thrift
> Issue Type: Improvement
> Components: netstd - Compiler
> Reporter: Paulo Neves
> Assignee: Paulo Neves
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Microsoft guidelines state that public properties should be PascalCase.
> Currently if a property in the thrift description is MyProperty it will be
> expanded into My_property which is clearly wrong. As this is a breaking
> change I added a pascal option to the netstd generator. I believe that in the
> future this should be the default and the old style deprecated.
> I also added the option to the generator of the Server test, so that we can
> have a test with the properties in PascalCase talking with a netstd client
> without PascalCase. I hope this is ok.
>
> https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions
--
This message was sent by Atlassian Jira
(v8.3.4#803005)