The optional keyword is indeed ignored in argument lists (hence the warning). Presently optional is only applicable to fields in structs. Many Thrift aficionados pass structs to functions and return structs from functions to maximize the ability to evolve their interfaces. You can give parameters "required" status and set default values however.
On Wed, Sep 24, 2014 at 10:02 PM, Narendra Babu <[email protected]> wrote: > Hi, > > Is optional keyword for method call is supported at all? The thrift > compiler is throwing below warning when optional is used for some of the > arguments of the method call. > > WARNING:] optional keyword is ignored in argument lists. > > Thrift version 0.9.1 > > Example > > i32 SampleTestMethod( > > 1: optional string desc, <========== throws warning for this > optional > 2: i32 index, > 3: string name, > ) > > Thanks, > Narendra.
