Anyone using OCaml for 2024 Advent of Code (AOC)?

That’s actually why I don’t use this kind of notation in serious code. Code review is hard, and I like it very much when I don’t need a lot of context to understand what operator I’m reading.
So (again in the context of recreational coding), .%{} for Hashtbl.get is fine, since I know that I only use generic Hashtbl.t (because keys are integers, strings, or tuples of those).

But if I start to introduce a Syntax module (say in the Hashtbl.Make) functor and start using
open or let open far from the use of the operator then everything becomes murky when reading diffs or looking at code in isolation. I’d rather see HString.find table key rather than table.%{key} without knowing what this is about. An alternative is to put the indexing operators inside the module itself so : table.HString.%{key} but then you don’t win a lot.

2 Likes

I am having trouble understanding day24 part2 challenge question, because what I came up with is failing,
Part 2: bbr,cng,gfd,jbd,jhg,mwt,nnq,z42 is a wrong answer on my account.