> Lua is an example of such a language, and when a semicolon is necessary is when you have something that could be misconstrued as being a call:

    (function() print("Test1") end)(); -- That semicolon is required
    (function() print("Test2") end)()
Tangential, but I sidestepped this ambiguity in a language I've been designing on the side, via the simple rule that the function being called and the opening parenthesis can't have whitespace between them (e.g. "f()" is fine but "f ()" or "f\n()" is not). Ditto for indexing ("x[y]"). If these characters are encountered after whitespace, the parser considers it the beginning of a new expression.

By sacrificing this (mostly unused, in practice) syntactic flexibility, I ended up not needing any sort of "semicolon insertion" logic - we just parse expressions greedily until they're "done" (i.e. until the upcoming token is not an operator).

I definitely think needless whitespace flexibility often causes problems. For eg I'm pretty sure Bjarne chose :: instead of : for the namespace operator in C++ due to ambiguity. A little bit of required whitespace around jump labels and ternary expressions and we could have saved an extra character in an operator that often occurs multiple times per line. Everybody runs linters that enforce that anyways. Likewise the inability to use a hyphen in an identifier has wasted a lot of my time over the years, but nobody uses squashed subtraction expressions.