Effective Go 中英双语版

Updated 13 days ago

custa (@custa) started discussion #8

3 years ago · 0 comments


其中的 T 为任意给定类型的占位符。实际上,你无法在 Go 中编写一个类型 T 由调用者决定的函数。这也就是为何 append 为内建函数的原因:它需要编译器的支持。 What append does is append the elements to the end of the slice and return the result. The result needs to be returned because, as with our hand-written Append, the underlying array may change. This simple example

数据 (Edit this file)


No description provided.

No comments on this discussion.

to join this conversation on GitBook. Already have an account? Sign in to comment

You’re not receiving notifications from this thread.

1 participant