kea icon indicating copy to clipboard operation
kea copied to clipboard

Add a string coercion function

Open rgrannell1 opened this issue 10 years ago • 1 comments

One of the worst aspects of Kiwi is that it is strictly-typed, but doesn't have many coercion functions. The most egregious example is the lack of a number -> string coercion function; xFromChars fails for numeric inputs, and there is no easy way to convert numbers beforehand.

A function is needed with the type signature any -> <character>. Suitable names include.

  • xTranscribe( )
  • xToText( )
  • xToString( )
  • xStringify( )

The text should be human-readable, not reparseable.

rgrannell1 avatar Aug 19 '14 22:08 rgrannell1

any -> <character> is overly ambitious; there is not universal, guiding principle by which conversion to text should be done. Numbers are a very useful, very clear subcase under which near isomorphic conversion can happen.

rgrannell1 avatar Nov 24 '14 05:11 rgrannell1