4 ms·
Trying to use Go as a declarative language seems to me ill-suited. The language works best when fully embracing imperative forms. You can use interface, composi
by loopz 6y ago
Trying to use Go as a declarative language seems to me ill-suited. The language works best when fully embracing imperative forms. You can use interface, composition and function values for effectful stuff, but it's no DSL.
- shp0ngle 6y agoYeah, I think the `detest` package is using wrong tool for the job. (And there is already testify and diff.)
- Cthulhu_ 6y agoI looked at the code and it did not feel good. Go's ecosystem focuses on line-of-sight coding, that is, happy path has the least indentation, unhappy path (e.g. test failures in the naive / default unit test approach) should be indented. This tool seems to do a lot of indentation. I know it's a bit of an arbitrary thing, but it's a good rule of thumb. And it's consistent with the other 99% of Go code, which is really important.