Hi Everyone -
I'm trying to build a
QuickCheck /
ScalaCheck like library for Go. I think property based testing would be especially valuable for many of the systems level programs being built in Go, and I also just find it fun to implement.
My problem so far is that I have to use interface{} everywhere (I aliased it to Any if you're reading the code.) For example, I built a Generator interface that generates interface{} types. I know and accept that Go doesn't have generics (and I did before I started building this thing) and I'm not asking for the feature here. Instead, I'm asking a few more specific (and I hope more constructive) questions:
- how can I make the Generator implementations better indicate what type they will generate?
- each LazyList will be homogeneous in its type. is there a better way to indicate that fact?
- if so, is there a good way to indicate its type?
- how (if at all) will go generate help with (1) or (2)?