generics of go?

131 views
Skip to first unread message

xie cui

unread,
Feb 7, 2021, 5:48:48 AM2/7/21
to golang-nuts
i try to run the generic code, i find two branch dev.go2go, dev.typeparams, the branch dev.go2go will translate generic to to no generic code and run it, as far as i know.  but i find the commit in dev.typeparams is more friendly for me to read, so how can i run the generic code by using dev.typeparams?

Ian Lance Taylor

unread,
Feb 7, 2021, 11:09:05 AM2/7/21
to xie cui, golang-nuts
On Sun, Feb 7, 2021 at 2:49 AM xie cui <cuiw...@gmail.com> wrote:
>
> i try to run the generic code, i find two branch dev.go2go, dev.typeparams, the branch dev.go2go will translate generic to to no generic code and run it, as far as i know. but i find the commit in dev.typeparams is more friendly for me to read, so how can i run the generic code by using dev.typeparams?

The dev.go2go branch contains a tool, cmd/go2go, that permits
experimenting with generics by translating generic code to ordinary
Go. It has various bugs and limitations and is only intended for
experimental purposes.

The dev.typeparams branch is intended to become a complete
implementation of generics. It is under active development and is
changed regularly. It is incomplete and will not be ready for use for
several months if not longer.

Ian
Reply all
Reply to author
Forward
0 new messages