Open ninjaaron opened 2 years ago
Hi @ninjaaron thanks for the feedback.
I completely agree, the phrase basic types
is ambiguous (at least in this tutorial's context) and most I assume would be thinking of "basic data types" in the manual (see https://ocaml.org/releases/4.12/htmlman/coreexamples.html#s:datatypes), where using that definition this statement is indeed incorrect. Perhaps it would be better with a small explanation and then a link to https://ocaml.org/releases/4.12/htmlman/intfc.html#s:c-ocaml-datatype-repr ?
This is the second time in not so long that this tutorial seems to be incorrect/misleading (see https://github.com/ocaml/ocaml.org/pull/1595) and I agree with @Octachron that overall the tone of the tutorial is not great. I'm wondering if it is causing more harm than good at this point?
Overall, I think that all tutorials would need to be edited. Another piece from the label tutorial:
When and when not to use ~ and ?
The syntax for labels and optional arguments is confusing, and you may often wonder when to use ~foo, when to use ?foo and when to use plain foo. It's something of a black art which takes practice to get right.
I cannot disagree more with the use of black art
to try to instill a false sense of familiarity with the reader, at the price of sending a terrible and inaccurate message.
I'm not sure what is meant by "basic types" here, but this is extremely misleading, since, as far as I know,
int
is the only common unboxed type in OCaml and evenfloat
is normally boxed. It would be good if this was reworded to reflect the fact that almost every non-integer value in OCaml is boxed, and this is indeed a pain-point for OCaml in HPC.