End keyword in Ocaml compared to Standard ML or Scala

This is rather hard to explain as beginner.
But sometimes i miss the end keyword as in, this end ends the definitions of X in expression Y using X. In don’t know if this sounds legit. But as far as I understand Standard ML has another view on things or scala using } . Feel free to elaborate. Scheme has ( ) , and ocaml has also begin end. But in Ocaml the placement of begin end is limited and does not always make code more clearer to indicate where things ends.

I mostly think it is the other way around

begin begin 1 + 3 end * 4 end + 4 end;;

But jokes aside, I am not entirely sure what your question is. OCaml mostly uses end where there is a block that can contain multiple things that are not necessarily separated. Like a struct uses end because there can be multiple items in there but if doesn’t have an end because the branches can only contain one expression.

Related New syntax version · Issue #11296 · ocaml/ocaml · GitHub