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

Deprecate slist

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.1
    • Component/s: Compiler (General)
    • Labels:
    • Environment:

      All

      Description

      I propose the slist type be deprecated (flagged by the compiler as scheduled for removal) in v1.0 and subsequently removed in a later version of Apache Thrift.

      Rationale: The Apache Thrift IDL type system is compact and elegant with few exceptions. The slist type is a string in all but PHP/Perl REST targets, where a string array is generated by splitting the input string on ‘,’. The slist type offers no cross language utility and is easily replaced in the two target environments which may require it. This type, and potential type additions like it, impact a wide range of concerns including language generators and the effort required to learn Apache Thrift.

      The only reference I can find to slist other than the Apache Thrift IDL syntax page is:

      Grokbase 2010/03/13:
      ---------------------------------------
      [Mayan] What are slist & binary used for?
      [Mark Slee] slist is a silly meta-type that's used for the generation of a REST-style PHP server. It means the data type is a string of comma-separated primitive values. The generated handler will break apart the string by exploding on commas before passing to the application.
      This is the type of thing that ought to have been an annotation, not a special type. If we'd had the generic annotation system around at the time this was written, would have certain used it, but it was a bit of a quick-hack if I remember correctly.
      I'd support deprecating/fixing it now, since having it available as a type just causes confusion.
      ---------------------------------------
      Viewed 2013/06/01:
      http://grokbase.com/t/thrift/dev/103dxy7tq7/slist-binary

      If there is consensus I would be happy to attach a compiler patch producing a deprecation warning for slist (leaving it otherwise intact).

      Best regards,
      Randy

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              codesf Randy Abernethy
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: