rgrannell1 / kea

Composable Functional Programming in R
16 stars 3 forks source link

Add a string coercion function #16

Open rgrannell1 opened 10 years ago

rgrannell1 commented 10 years ago

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.

The text should be human-readable, not reparseable.

rgrannell1 commented 9 years ago

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.