grain
grain copied to clipboard
Stdlib: Add `toString` functions
Currently grain has a global toString
function that works on all datatypes in pervasvies. We should also add toString
functions to libraries that work on specific datatypes such as Char.toString
a few advantages of this is, these functions will be smaller and faster, and more type safe.
To better share code between this and the runtime toString
function it would be best if we kept these toString
functions in the runtime and just imported them in their respective libraries.
Future Question: after this issue is completed a future question is if we should remove the pervasvies toString
to enforce better typesafety.