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

> I would much rather have powerful hygienic compile-time macros to generate code

There's still a place for this, even in a Go with the proposed generics.

There's 3 main styles of generics, each with different speed/space trade-offs:

* use interface{}, which runs slower and has no compile-time checking, but can be faster to code

* use the proposed type-safe generics compilation, which generates compact code, but which require more detailed coding

* use the hygienic compile-time macros, which run fast, but can generate lots of bloat when compiling

There's a place for all three being available. So perhaps Go 2 will get macros one day !



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

Search: