ocaml / ocaml.org

The official OCaml website.
https://ocaml.org
Other
160 stars 316 forks source link

Recipes using the same libraries are indistinguishable #2564

Open richardhuxton opened 3 months ago

richardhuxton commented 3 months ago

Screenshot 2024-07-01 22 42 09

For the cookbook entries covering "command line arguments" I made one recipe using Cmdliner and two using the standard-library (once with Sys.argv and once with Arg). Of course you can't tell the two apart on the listing.

It feels like the simplest fix might be to add a new field in the yaml header title_postscript: " (Argv)" so the displayed title can be "using the Standard Library (Argv)". I'm happy to try and put a patch together if this sort of approach would be acceptable.

richardhuxton commented 3 months ago

I temporarily merged the two recipes into one for my submission. Having had a think about it, it perhaps makes more sense to have a recipe_title which would be just be the whole displayed title (if present), otherwise fall back to using the library name.

sabine commented 1 month ago

Hey, sorry for the late answer. My opinion on this is that there is hardly any value in proposing multiple recipes using the same libraries. This only creates choice paralysis for the reader.

That's why just showing one way to do things is fine. The only requirement is that it should be code that you wouldn't be ashamed of copying into a production codebase.