Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Talk:Block (programming)

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 10 months ago by Stevebroshar in topic Rename suggestion

Suggestion for a small change

[edit]

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

Yes :) Don't use heavy formatting in the talk page. I simplified your comment for readability. ... Yes, singular is usually better than plural even though _many_ people use plural. I often change plural to singular. ... I deleted that sentence since it is low value and confusing. A declaration _is_ a statement! Saying a block is statements is all we need to say, and the first sentence says that. Stevebroshar (talk) 23:27, 3 September 2025 (UTC)Reply

Rename suggestion

[edit]

IMO the current name Block (programming) is not great and could be better. Consider that there is a Block programming that has nothing to do with computer programming. I've noticed some pages have been renamed from XXX (programming) to XXX (computer programming), and I think that is a good change and a good trend. Therefore, we should consider that change here. But, IMO a good way to choose a disambiguation phrase for a title is to pick a prefix that is 1) well-known; preferably has its own article and 2) is commonly used or at least sounds good with the root topic name. In this, case computer programming block is OK, but I think source code block sounds even better so I propose Block (source code). Stevebroshar (talk) 12:21, 7 September 2025 (UTC)Reply