I've found the strscans documentation helpful, sure. My experience with 
strscans docs is limited to looking at the very first example (yep, that's how 
scanf assigns its arguments) and then the very first table (yep, those are the 
`$blah` that I need to match this input). Since I've used sscanf before in C, 
and since I was always considering for strscans for quick AoC type parsing 
instead of something I would've used npeg for, these were all the docs I needed.

strscans is cited above though as a "complete mess". I don't know how exactly, 
but I feel like drawing that person's reasons out would be more helpful than 
finding people who approve of the current doc. Reasons might include "not 
having C scanf as context" or "not knowing when to use this module vs. other 
parsing modules". Documentation that people think is good can come off 
extremely differently when some critical expectations of the reader aren't met. 
For example, the format library for OCaml: 
<https://v2.ocaml.org/releases/5.0/api/Format.html> . Try reading that to see 
how you could do a little `echo &"hello {world}"`. Or read my account of my 
reading it: <https://discuss.ocaml.org/t/what-i-dislike-about-ocaml/10248/27>

> But my actual experience with Format not to long ago was this: I saw someone 
> say that Format should be used instead of Printf, and I went to these docs, 
> and I was completely baffled as to how I could print anything at all with 
> Format. ...
> 
> The documentation is (naturally) completely focusing on Format’s innovations 
> which are all about pretty-printing and automatic line-breaking, and since 
> that wasn’t what I wanted to do (I just heard “Format’s better–use it 
> instead”) I skimmed those parts, concluded that it was necessary to use 
> `@[..@]` somehow to print normally, and got distracted so much by those 
> characters that I missed this useful example

The long examples of strscans might hurt likewise by drawing attention to 
themselves and making them seem like the point of the module.

Reply via email to