Last 12 weeks · 0 commits
2 of 6 standards met
Hi BurntSushi, Thank you very much for the lib first, it is awesome. I am working on a project called GoPark, a local map/reduce data computing thing. At first I have to use interface{} a lot for the Mapper/Reducer function definitions, since I found ty project I have been working on refactoring and found a problem. Deep into the call stack, I cannot know the exact parameters type for a function, so I used the interface{} but only inside the lib, so there will be some functions like map(interface{}) int, and the input is a int, in ty.Check, that could be chk := ty.Check(new(func(func(ty.A) ty.B, ty.A) ty.B), fn, value) so the first ty.A is interface{}, and the second ty.A is a int, cannot be unified. I think it's reasonable that the function can take an interface{} input parameter, but the ty.Check check exactly the type matching. So I only added few lines of code to work around this. Is there any other problems that I didn't think through? Thank you very much.
Repository: BurntSushi/ty. Description: Easy parametric polymorphism at run time using completely unidiomatic Go. Stars: 198, Forks: 21. Primary language: Go. Languages: Go (99.9%), Vim Script (0.1%). License: WTFPL. Open PRs: 1, open issues: 0. Last activity: 12y ago. Community health: 42%. Top contributors: BurntSushi.
Hi, this is not exactly an issue, but just want to have a place to say THANK YOU! Having to implement an interface (3 functions) in Go to sort is not fun at all, and I worry if I wrote the correct code or not all the time. This library has been a life saver! Thank you.