Closed LVMVRQUXL closed 3 months ago
After resolving this issue, we will be able to introduce the ZeroAsStringSerializer
type in the types-kotlinx-serialization
subproject for serializing the Zero
type as String
. This could be useful for communicating an already formatted zero like 0.00
.
Using RegExr might be a solution for storing and documenting the regular expression used by the constructor(Any)
function.
Superseded by #681.
📝 Description
For aligning with our design goals on less is more, we want to provide only constructors for creating an instance of the
Zero
type in a natural way. These constructors should be accessible from all Kotlin platforms and Java.Here's the Application Programming Interface (API) goal that we want to achieve with this issue:
These constructors should replace all factory functions introduced previously for the
Zero
type.Also, the
Zero.Companion.PATTERN
property being used only by theconstructor(Any)
function of theZero
type, we want to remove it from the public experimental API and merge its documentation into this constructor's documentation.✅ Checklist
constructor(Any)
function with tests, documentation and samples.Zero
type for removing factory functions other than constructors.Zero
type and unused internals.constructor(Any)
function for removing usages of theZero.Companion.PATTERN
property.constructor(Any)
function for removing usages of theZero.Companion.PATTERN
property.Zero.Companion.PATTERN
property.Zero.Companion
type.constructor(Any)
function by introducing an internalInvalidZeroRepresentation
type.