back

by eatonphil·11y ago·view on hn ↗
I definitely do need to start working with a stdlib replacement. I'm planning to move to Jane Street's Core soon.

I'm still pretty new to OCaml so using functors was not immediately obvious. I did plan to transition to functors for user-level configuration modules. But coming to OCaml from (e.g.) C++ has definitely influenced my default modus operandi.

Thanks for the feedback!

1 comments
some more feedback: the response code would be bit more readable if you started off with a record type for the args to http_response.

also, a .ml file introduces an automatic module, so you don't need the toplevel module definition in most of your files.

the real world ocaml section on modules is worth reading: https://realworldocaml.org/v1/en/html/files-modules-and-prog...

Great feedback. Record type for the http_response is a good idea.

Right, I really wasn't sure at first how inclusions would work out so I went a little explicit. In some cases, I felt like it was definitely a good layout (rule.ml). But overall, this will be one of the first easy refactors. Thanks!