News for hackers. Stuff that matters.
Re:Go Proposal: first-class support for sorting slices by burntsushi on Tuesday August 16, 2016 @01:17PM (#12298934)
Re:Go Proposal: first-class support for sorting slices by interactiv on Tuesday August 16, 2016 @01:37PM (#12299069)
Yes, if you look at the source code I use unification to tell whether types match or not.
Re:Go Proposal: first-class support for sorting slices by burntsushi on Wednesday August 24, 2016 @06:24PM (#12355716)
You're doing a lot of repeated work though. I was trying to point out this function, which does unification in a generic context, given some function type: https://godoc.org/github.com/BurntSushi/ty#Check ... For example, it reduces a lot of the reflection boiler plate: https://github.com/BurntSushi/ty/blob/master/fun/list.go#L80