Github user apocolipse commented on the issue:

    https://github.com/apache/thrift/pull/1002
  
    In my opinion this is very Un-Swifty.  Namespace prefixes are an 
Objective-C Cocoa convention, Swift tries to get away from this convention (in 
fact with Swift 3.0, NS prefixes on many Foundation types have been dropped*)
    It would be more proper to Nest them instead of rename them, and not that 
difficult either, simply install everything in a struct:
    ```
    namespace swift MyNamespace
    struct MyStruct { ... }
    service MyService { ... } 
    ```
    ```swift
    struct MyNamespace {
      struct MyStruct { ... }
      protocol MyService { ... }
    }
    ```
    Alternatively, Swift uses Module scoping for namespacing, so having the 
generator spit out an Xcodeproj with a Framework scheme, or SPM formatted file 
hierarchy, would be ideal, this would give you import semantics and direct 
access to your types when there's no conflicts, 
    ```swift
    import MyNamespace
    var aStruct = MyStruct()
    ```
    as well as nested access when conflicts exist
    ```swift
    var aStruct = MyNamespace.MyStruct()
    ```
    
    Either module scoping or nesting are the ideal Swifty ways to leverage 
namespaces, Name prefixing shouldn't be used here.
    
    *Dropped where types have been added as value types for more Swift-like 
handling, mutability, etc.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to