Semicolon?
jmh530
john.michael.hall at gmail.com
Thu Apr 1 17:10:02 UTC 2021
On Thursday, 1 April 2021 at 16:02:48 UTC, Steven Schveighoffer
wrote:
> [snip]
>
> I don't know if this is specific to D, but I do notice that
> forgetting punctuation usually produces a wall of errors, of
> which only the first one is relevant (usually). When you have
> not been programmed to write punctuation in coding properly,
> the oddest things come out. I sometimes spend minutes trying to
> figure out why their code is not compiling, when I finally
> notice a stray closing curly brace somewhere off in the
> distance.
>
> Not sure if there's a way to improve it.
>
> -Steve
Yeah that's an annoying thing to catch. Reminds me of the video
with the basketball players passing the ball as the guy in the
gorilla suit walks through, the semicolon is just not the thing
you're focusing on sometimes.
The only thing I can think of is that when the compiler sees an
error, it can check if the prior line ends with a semicolon, then
it can check if the error would be generated if a semicolon is
added. Finally, display an error about missing a semicolon.
More information about the Digitalmars-d
mailing list