[ 
https://issues.apache.org/jira/browse/THRIFT-4269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16107803#comment-16107803
 ] 

ASF GitHub Bot commented on THRIFT-4269:
----------------------------------------

Github user djnym commented on the issue:

    https://github.com/apache/thrift/pull/1319
  
    I agree with the rationale behind the change and the code looks fine.  It 
seems like the CI failures were related to client pools and not this code.  I 
would say this should be merged.


> Don't append '.' to Erlang namespace if it ends in '_'.
> -------------------------------------------------------
>
>                 Key: THRIFT-4269
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4269
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Erlang - Compiler
>    Affects Versions: 0.10.0
>            Reporter: David Hull
>            Priority: Minor
>
> THRIFT-3834 added support for namespaces to the Erlang code generator. 
> However, that support uses a {{.}} between the namespace name and the type 
> name. This is inconvenient because, although {{.}} is a valid character in an 
> Erlang atom, atoms that contain {{.}} must be quoted. This means that a 
> struct named {{MyStruct}} in the namespace {{NS}} will cause a record named 
> {{'NS.MyStruct'}} to be generated. Here are the rules for naming atoms in 
> Erlang:
> bq. Atoms begin with a lower-case letter, and may contain alphanumeric 
> characters, underscores (_) or at-signs (@). Alternatively atoms can be 
> specified by enclosing them in single quotes ('), necessary when they start 
> with an uppercase character or contain characters other than underscores and 
> at-signs.
> I propose that if an Erlang namespace ends in a {{\_}} that no {{.}} be added 
> between the namespace and the struct name when creating the record. This will 
> preserve the current behavior unless the namespace ends is a {{\_}}, but 
> allow users to override the normal behavior by adding an explicit {{\_}} to 
> the end of their namespace declarations.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to