Go 2のProposalを見ると
https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md
> We do not expect approaches like the C++ STL iterator types to become widely used. In Go that sort of idea is more naturally expressed using an interface type. In C++ terms, using an interface type for an iterator can be seen as carrying an abstraction penalty, in that run-time efficiency will be less than C++ approaches that in effect inline all code; we believe that Go programmers will continue to find that sort of penalty to be acceptable.
って書いてあるけどまあGoはそういう言語で、そこまで最適化にこだわる言語じゃない
最適化にこだわるひとはRustとかC++とか使うべき
Go language part 5
■ このスレッドは過去ログ倉庫に格納されています
415デフォルトの名無しさん
2022/06/16(木) 02:11:04.77ID:TlphqPPg■ このスレッドは過去ログ倉庫に格納されています
