Closed smondet closed 9 years ago
Seems fine.
main.ml
before adding new logic.Test
framework makes it harder to grok. Took me a while to get used to check
being an named assert
. unit
. debug_mode
is always commented out, so what's the point of defining it?
- At 650 lines of code, I would have separated main.ml before adding new logic.
OK will split: https://github.com/smondet/trakeva/issues/14
- Writing your own Test framework makes it harder to grok. Took me a while to get used to check being an named assert.
That's a far more general problem :)
Finding a test frameworkd that doesn't suck more than 30 lines hacked together; I haven't (in any language BTW).
The word assert
has a very specific meaning in ocaml (evan emacs colors it
differently). Test.check
seems OK for now and stresses the fact that it's just
a function (no compiler / syntax support).
- I'm not certain that this code needs to be so monadic since about half of your binds are just returning unit.
Those functions return (unit, 'some-error-type) Result.t Lwt.t
; that's
much more than unit
and we cannot escape it (that's how Lwt
itself works).
- debug_mode is always commented out, so what's the point of defining it?
Well, for debugging :) (I've used them a lot lately)