The fate of contracts prototype?

228 views
Skip to first unread message

alex.be...@gmail.com

unread,
Dec 23, 2019, 3:21:55 AM12/23/19
to golang-dev
Hi!

I'm following the development of https://go-review.googlesource.com/c/go/+/187317/ (the Go2 contracts prototype) and I have a question about its long-term fate. It looks like the current version of the code shows that contracts are a viable approach to generics and can be implemented with a reasonable effort.

So is this prototype going to become a real implementation or is it going to be discarded? If it's going to become real, then is it possible to develop it in a public tree?

Jan Mercl

unread,
Dec 23, 2019, 3:40:16 AM12/23/19
to alex.be...@gmail.com, golang-dev
On Mon, Dec 23, 2019 at 9:21 AM <alex.be...@gmail.com> wrote:

> I'm following the development of https://go-review.googlesource.com/c/go/+/187317/ (the Go2 contracts prototype) and I have a question about its long-term fate. It looks like the current version of the code shows that contracts are a viable approach to generics and can be implemented with a reasonable effort.
>
> So is this prototype going to become a real implementation or is it going to be discarded? If it's going to become real, then is it possible to develop it in a public tree?

For example, recently: https://go-review.googlesource.com/c/go/+/187317

Axel Wagner

unread,
Dec 23, 2019, 2:09:09 PM12/23/19
to alex.be...@gmail.com, golang-dev
Hi,

On Mon, Dec 23, 2019 at 9:21 AM <alex.be...@gmail.com> wrote:
It looks like the current version of the code shows that contracts are a viable approach to generics and can be implemented with a reasonable effort.

I don't think it shows that. All the changes are in src/go/*, none of them in src/cmd/* (or src/runtime, src/reflect or anywhere else). Meaning, all this has shown is that it's viable to implement a type-checker for the design draft. In particular, it allows no conclusion about a) whether it's also possible to make it into a full implementation (i.e. producing runnable code) and b) whether that implementation would be any good.

I would also like to know more about the progress on it. But I totally understand that it's not really in a phase where it is developed in the open.
 

So is this prototype going to become a real implementation or is it going to be discarded? If it's going to become real, then is it possible to develop it in a public tree?

--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/aaae12aa-6815-49da-a747-300d5b8ae301%40googlegroups.com.

Ian Lance Taylor

unread,
Dec 23, 2019, 2:50:46 PM12/23/19
to alex.be...@gmail.com, golang-dev
On Mon, Dec 23, 2019 at 12:21 AM <alex.be...@gmail.com> wrote:
>
> I'm following the development of https://go-review.googlesource.com/c/go/+/187317/ (the Go2 contracts prototype) and I have a question about its long-term fate. It looks like the current version of the code shows that contracts are a viable approach to generics and can be implemented with a reasonable effort.
>
> So is this prototype going to become a real implementation or is it going to be discarded? If it's going to become real, then is it possible to develop it in a public tree?

It's just a type checker at present, not an implementation.

The development is being done in a public tree, or at least a public
CL, and that will continue.

Ian
Reply all
Reply to author
Forward
0 new messages