Bend
Bend copied to clipboard
(Request) String-casting numbers for print()
I think it would be great if print() could cast number arguments (uint, int, float, etc.) into Strings by default, or at least accept numbers without first needing a String cast.
For example:
def func(x):
return x + 1
def main():
with IO:
b <- print(func(x))
return wrap(b)
As opposed to b <- print(*some-string-cast*(func(x))).
This would be make returning large amounts of computation results a little cleaner.
It definitely could do that, since numbers and constructors have a different memory representation.
Hi! I would like to open a PR to implement this, if possible. I just need some help knowing where to start and I can work on it