> > > func ShortestPath(type G Graph(Node, Edge), Node, Edge) (g G, from, to > Node) []Edge >
I don't think this syntax is valid according to the draft design, or your blog post. Node and Edge are used before they are declared. Maybe func ShortestPath(type Node, Edge, G Graph(Node, Edge)) (g G, from, to Node) []Edge except according to your description, all three type parameters would have Graph(Node, Edge) as constraints, which doesn't make sense either. > On Sun, Sep 9, 2018 at 8:21 PM Jonathan Amsterdam <jbams...@gmail.com > <javascript:>> wrote: > >> >>> FWIW, in my pseudo-interface description >>> <https://blog.merovius.de/2018/09/05/scrapping_contracts.html>, >>> >> >> Unrelated to this particular issue, but since you link to your blog >> post, I just want to mention that in your graph example, >> >> func ShortestPath(type Node, Edge) (g Graph(Node, Edge), from, to >> Node) []Edge >> >> will have dynamic dispatches in the body (since g is an ordinary >> interface value). The one in the draft design is completely static. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.