I got a panic after using toString(anArray), because the builtin function toString is not supported for CometArray
>> var cc = [1, 2, 3]
CometNop
>> cc
[CometInt(1), CometInt(2), CometInt(3)]
>> println(cc)
&{3 [0xc0001020b0 0xc0001020b8 0xc0001020c0]}
CometNop
>> toString(cc)
panic: All types should have been exhausted!!
goroutine 1 [running]:
github.com/chermehdi/comet/std.ToString(0x667a58, 0xc0001042a0, 0x1)
I think, We have to implement two functions to represent objects as strings, for example:
- A debug function should return:
CometArray[CometInt(1), CometInt(2), CometInt(3)]
- The
toString function should return just [1, 2, 3]
I got a panic after using
toString(anArray), because the builtin functiontoStringis not supported forCometArrayI think, We have to implement two functions to represent objects as strings, for example:
CometArray[CometInt(1), CometInt(2), CometInt(3)]toStringfunction should return just[1, 2, 3]