You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is a known limitation, but I'm not sure how to proper fix.
If you have one function such as Foo.Bars() []string, then it needs to create a new array and, maybe, encoding all strings.
It have two alternatives:
Create functions to get string per index: Foo.BarsAt(index int) string.
That allows to zero-copy, since it call will return a single string (which is, usually, just one pointer). Or, in the worse situation, it will encode a single string.
Create a "class/struct" such as StringArrayViewer: Foo.Bars() []StringArrayViewer.
That will return array of fixed-size struct, which contains the start position of the first string. Then, StringArrayViewer have methods such as GetAt(index int).
The second case, is basically what happens in your schema (but instead of known-type, you need to create your custom type). 😅
This is not possible:
So, at the moment we have to do:
This is not very convenient.
The text was updated successfully, but these errors were encountered: