Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4409

Void typed fields in union (aka set without a value)

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.10.0
    • Fix Version/s: None
    • Component/s: Compiler (General)
    • Labels:
      None

      Description

      It would be a nice addition to the language if thrift supported a void field type for unions, this would be used for fields that are set but without a value, i.e. the act of setting it is all the information that is required. Take this example:

      union Query {
        // Find only this item
        1: string only;
        // Find any of these items
        2: list<string> anyOf;
        // Find all of these items
        3: list<string> allOf;
        // Every item
        4: void all;
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mattnathan Matt Nathan
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: