GitShow/BurntSushi/ty
BurntSushi

ty

Easy parametric polymorphism at run time using completely unidiomatic Go.

by BurntSushi
Star on GitHubFork

Go

198 stars21 forks2 contributorsQuiet · 12y agoSince 2013WTFPL

Meet the team

See all 2 on GitHub →
BurntSushi
BurntSushi70 contributions

Languages

View on GitHub →
Go99.9%
Vim Script0.1%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
42
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 1 in progress · Last activity 12y ago
See all on GitHub →
mijia
What if the func take interface{} as parameter?OpenPR

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.

mijia · 12y ago

Recent fixes

View closed PRs →
iNamik
Any reason why session.vim isn't listed in .gitignore?ClosedIssue

Just wonderin' :)

iNamik · 5y ago
allenanie
Thank you noteClosedIssue

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.

allenanie · 10y ago
Structured data for AI agents

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.

·@ofershap

Replace github.com with gitshow.dev