You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Kevin Wojniak <kw...@box.com.INVALID> on 2018/12/19 02:28:15 UTC

Primitives as NSNumber in 0.11.0

I'm looking at upgrading our usage of Thrift from 0.9.3 to 0.11.0 for
Objective-C/Swift.

It appears now that "bool" and other primitives are converted to NSNumber
for return types. Was this intentional? Unfortunately this makes it less
type safe now as NSNumber can hold any type of number or boolean. Just
curious to hear about the rational about this.

By the way the enhanced Objective-C generics and NS_ENUM support is
fantastic! Significantly improves the Swift usage.

Kevin

Re: Primitives as NSNumber in 0.11.0

Posted by "James E. King III" <jk...@apache.org>.
On Tue, Dec 18, 2018 at 9:28 PM Kevin Wojniak <kw...@box.com.invalid> wrote:
>
> I'm looking at upgrading our usage of Thrift from 0.9.3 to 0.11.0 for
> Objective-C/Swift.
>
> It appears now that "bool" and other primitives are converted to NSNumber
> for return types. Was this intentional? Unfortunately this makes it less
> type safe now as NSNumber can hold any type of number or boolean. Just
> curious to hear about the rational about this.
>
> By the way the enhanced Objective-C generics and NS_ENUM support is
> fantastic! Significantly improves the Swift usage.
>
> Kevin

You may want to ask on dev@ instead of user@ - I'm currently rolling the 0.12.0
release together which will have better swift support.  I don't know
much about it
though since it was contributed by others.

- Jim