Open schollz opened 1 year ago
As far as I know, the same reason ufmt.Sprintf
doesn't match fmt.Sprintf
- they require reflection, and whether or not to have a reflect
package in Gno is up for debate.
I recall having already stumbled upon this issue in the past, and since I was in Go before sort.Slice
was implemented and would never go back, I think that even if we decide to not implement reflection in Gno, the Slice
function is so immensely useful it ought to be implemented as a native binding.
Thanks. Its not a deal breaker for me not to have sort.Slice
- I was able to write Go code pre1.8 without it and I can do it again 😄 , but it might be worth leaving the issue open to track it?
Also, is there an ongoing debate about reflection? It would be useful to link a reflection discussion to this issue (and also for my own edification about its pros/cons re: gno)
Not as far as I know. @moul do you think it's worth making an issue to discuss this, or is reflection more in the ballpark of "we want it, just didn't do it yet"?
Let's keep the discussion open until we create a meta issue to gather everything and establish a backlink. Ultimately, we need to find practical solutions to support both fmt
and sort.Slice
.
Hi all! I still getting used to
gno
and noticed that I'm getting a panic when usingsort.Slice
:I looked through the codebase and can see that this seems not to be available in
gno
, and I was wondering whether this is correct, and if there is a reason. I'm happy to attempt adding it togno
, unless there is a particular reason its left out.