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
func Call(t *Thread, f Value, args []Value, next Cont) error
Call calls f with arguments args, pushing the results on next. It may use the metamethod '__call' if f is not callable.
Actually, Call not only pushes the results of the call to f onto next, but proceeds running next and further continuations until nil or an error occurs.
I'm guessing this is the intended behavior, but I think that with this documentation and/or the name Call, this API is confusing, especially if seen in contrast to runtime.Call1, which has a more "expected" signature:
The doc for
runtime.Call
says:Actually,
Call
not only pushes the results of the call tof
ontonext
, but proceeds runningnext
and further continuations untilnil
or an error occurs.I'm guessing this is the intended behavior, but I think that with this documentation and/or the name
Call
, this API is confusing, especially if seen in contrast toruntime.Call1
, which has a more "expected" signature:One possibility to make the API more intuitive would be to rename
Call
to something else (e. g.TailCall
) and add a newCall
APIwhose implementation would call the "old"
Call
with a termination fornext
.What do you think?
The text was updated successfully, but these errors were encountered: