Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Another approach using code generation is gen: http://clipperhouse.github.io/gen/

(Disclaimer, I work with the guy behind it)

Personally these sorts of libraries just strengthen my opinion that golang really needs proper generics. However, if you're already gonna use Go they're pretty neat.



Yes I know that. I have been in touch with Matt several times about this. I really look for ways to improve it, even if it is one small step at a time. Just posted a thread to golang-nuts about this: https://groups.google.com/forum/#!topic/golang-nuts/nLwWkoS7... noting Go really needs generics and maybe even lambdas some day.

Just leaving this project here. Hopefully, I will maintain it as bugs etc arises. Who knows, maybe someday Go will have these features and there will be many apps instrumenting Go for their application logic and use it.


> Go really needs ... lambdas some day

Eh? Go has lambdas:

    func(x int) int { return x * x }(5)


Indeed, but presumably they mean sugar to trim that down a bit. Like C# offers with the ... => ... syntax.

Alternate syntax doesn't seem very "Go", so I wouldn't hold my breath!


Yes that's what C# and Python offers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: