grain icon indicating copy to clipboard operation
grain copied to clipboard

Stdlib: Add `toString` functions

Open spotandjake opened this issue 1 year ago • 0 comments

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.

spotandjake avatar Apr 01 '23 15:04 spotandjake