Jump to content

Talk:Block (programming)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Suggestion for a small change

The sentence to be changed (perhaps)

Currently (in the "Latest revision as of 19:50, 13 November 2024" version of this article), the second sentence of the article says:

Blocks consist of one or more declarations and statements.

An idea for changing that sentence

I recommend using a singular noun as the subject of the sentence ("A block" instead of "Blocks"), and specifying a separate number -- zero! -- for the minimum number of declarations per block, while retaining (keeping) the number "one" as the minimum number of statements in a block.

The sentence could instead say:

A block consists of zero or more declarations and one or more statements.

That sentence would then offer more (correct) information, and less [potential] ambiguity. IMHO there would be no harm in (thus) making the sentence easier to [correctly] parse, and harder to misinterpret.

Any comments?

Thanks, -- Mike Schwartz (talk) 21:26, 16 February 2025 (UTC)[reply]