Hi all,
Is someone already working on NSDecimal and/or NSDecimalNumber? If not I would
like to help and have a few questions on how to best tackle this.
I think it’s best to start with NSDecimal and then use NSDecimal to create
NSDecimalNumber. That’s why I want to concentrate on NSDecimal first. As far as
I know there is no CF type we can utilize for NSDecimal and the existing
interface is not Swift-like. I see two possible approaches here:
We try to match the existing interface of NSDecimal as close as possible and
only provide the same function interface with UnsafePointers all over the place
We create a Swift-like version of the NSDecimal struct. This struct stores its
data in private properties and exposes methods (add, multiply, etc.) and
computed properties (isNaN, etc.). Additionally, to achieve compatibility with
the existing Foundation NSDecimal, we provide the same functions that take
NSDecimal pointers and internally use the methods of the Swift struct.
What do you think?
Unfortunately, I haven’t found a lot of documentation for NSDecimal, yet. Is
there any documentation, which describes the NSDecimal functions?
—Florian
_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev