[go-nuts] [ANN]: go_generics code template engine for Go that Google was hiding from you :)

2018-08-10 Thread michal


TL;DR you can go-get go_generics - no Bazel needed

go_generics [1] is a tool that was first observed few months back with the 
release of gVisor. It allows for generating code from template while still 
working with standard Go code. It's a great improvement over working with 
Go templates but nothing like C++ templates.

We used it at Scylla to create go-set [2] a replacement for fatih/set [3] 
package. This approach allows for working with plain types instead of 
interface{} thus eliminating "escape to heap" problem and improving 
performance x10 in some cases.

The reason to fork it was a messy build process with Bazel. To streamline 
things for go-set [2] we fixed that so you can now just go-get the tool. 
The tool is universal and can be a good fit in almost any project.

Enjoy!

[1] https://github.com/mmatczuk/go_generics

[2] https://github.com/scylladb/go-set

[3] https://github.com/fatih/set

Michal

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] [ANN]: go_generics code template engine for Go that Google was hiding from you :)

2018-08-10 Thread michal


TL;DR you can go-get go_generics - no Bazel needed


go_generics [1] is a tool that was first observed few months back with the 
release of gVisor. It allows for generating code from template while still 
working with standard Go code. It's a great improvement over working with 
Go templates but nothing like C++ templates.


We used it at Scylla to create go-set [2] a replacement for fatih/set [3] 
package. This approach allows for working with plain types instead of 
interface{} thus eliminating "escape to heap" problem and improving 
performance x10 in some cases.


The reason to fork it was a messy build process with Bazel. To streamline 
things for go-set [2] we fixed that so you can now just go-get the tool. 
The tool is universal and can be a good fit in almost any project.


Enjoy!


[1] https://github.com/mmatczuk/go_generics

[2] https://github.com/scylladb/go-set

[3] https://github.com/fatih/set


Michal

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.