rocket-lang icon indicating copy to clipboard operation
rocket-lang copied to clipboard

unique behavior of puts

Open MarkusFreitag opened this issue 3 years ago โ€ข 0 comments

While puts is useful for debugging, it can not really be used for writing stuff to the terminal. The main reason for that is how strings are handled. Lets discuss whether this should change or it stays this way and we add another simple way of writing to the terminal.

// what you get
๐Ÿš€ ยป puts("1\n2")
"1\n2"
ยป nil
// what you expect
๐Ÿš€ ยป puts("1\n2")
1
2
ยป nil

MarkusFreitag avatar Dec 10 '22 15:12 MarkusFreitag