Talk:Off-side rule

message: The page doesn't specify whether "the off-side rule" refers to this particular definition of using indent to signify blocks, or any such ruleset.  — Preceding unsigned comment added by 81.191.75.7 (talk) 21:58, 29 July 2015 (UTC)
replies: text: Either this has already been addressed or I don't understand your concern. It does seem to have a rather specific meaning yet may vary a little between languages where it's deployed. So, the answer to your concern is: yes? Stevebroshar (talk) 13:30, 13 February 2024 (UTC)
thread_title: Specific or general

message: With regard to the discussion above, about the connection with the sporting meaning of "off-side", I'll point out that in the sport known as "soccer" in the USA, and "football" everywhere else in the known universe, the offside rule is generally acknowledged as the hardest to understand and to explain to outsiders. It is, nevertheless, a crucial rule whose abolition changes the game entirely.
But that's not what brought me here. The page has the following: 
"(note also the obligatory colons — they are merely syntactical markers to make it easier to read)"
Are you sure you mean "obligatory"? Perhaps you mean "traditional". It's not possible for something to be both obligatory and optional at the same time.
Also, the article is still marked as a stub, although I can't think of anything much that needs adding to it. I suggest that the "stub" template be removed.--Nyelvmark 00:24, 8 September 2007 (UTC)
replies: text: Colons aren't optional. What the quote is means is that they aren't nescessary to make the language interpretable, but are in the language simply to make it more readable. Ragzouken 13:35, 16 October 2007 (UTC)
replies: text: I think the confusion here is between the particular syntax of Python and the syntax that off-side implies. In Python, the colons are required syntax -- necessary to make interpretable. It's possible that the Python designers used that syntax to enhance code readability, but that is way off topic for this article. The point IMO is that that colon syntax is required by Python syntax, but is not required to implement a off-side rule in a general sense. FWIW I think this article would be much better if there was an additional example in a language that doesn't use the colon syntax. Stevebroshar (talk) 13:40, 13 February 2024 (UTC)
thread_title:  Some comments 

message: Although it may apply to the Python language, the term is very seldom used within the community. --Paddy (talk) 04:02, 20 February 2008 (UTC)
replies: text: What term is used? Stevebroshar (talk) 13:45, 13 February 2024 (UTC)

text: That could be said for many languages; while technically C is free-form, C statements are almost always indented by a set number of space for each level of nesting. What "technically" the parser does seems more interesting than how it's used in practice.--Prosfilaes (talk) 13:20, 30 August 2019 (UTC)

text: I don't get the point of 2600:1003:B004:D076:DD9:5E02:D54C:2B1E either. "Python statements are almost always indented by a set number of spaces for each level of nesting" ... because they have to be! yes, not only for style like for a free-from language. That's the point of this article. The parser uses indentation as syntax. Stevebroshar (talk) 13:48, 13 February 2024 (UTC)
thread_title:  Python 

message: At http://en.wikipedia.org/wiki/Off-side_rule#Definition I don't doubt the historical accuracy of the Landin quote, but hasn't he confused left for right?  That is to say, isn't this 
....'....1...'...2...'...3...'...
          first-token-on-the-previous-line
     token-to-the-LEFT-of-the-first-token-on-the-previous-line
an example of what he describes using the word left?
I think he means, by "start of a _new_ declaration", that one is no longer inside the old one (which would be the inner scope). Although it's really not understandable.
--81.191.75.7 (talk) 22:09, 29 July 2015 (UTC)
thread_title:  Left versus right 

message: A section needs to be rewritten.
Regarding the C-style curly braces instead of indenting, the article says "The main advantage of this is that it makes it possible for tools to correct the indentation automatically." 
That isn't an *advantage* of the alternative, it's a crutch that people use to make their code more readable. An advantage of this alternative might be that it is up to the developer to indent however they need to -- including not indenting shorter blocks if they want, while still indenting longer blocks. Another advantage might be that it makes parsing of the language a little easier.  — Preceding unsigned comment added by 71.13.147.17 (talk) 18:15, 25 July 2012 (UTC)
replies: text: exactly, that’s stupid: if the program doesn’t compile when indented incorrectly, there’s no reason for relying on a tool that corrects indentation, correct indentation is simply enforced. I’ll delete that part and replace it with the arguments you mention. — Flying sheep (talk) 19:48, 2 January 2013 (UTC)
thread_title:  Main advantage of curly braces 

message: I think "syntactically significant whitespace" is standard term for this, including in Python community. 76.119.30.87 (talk) 16:52, 25 March 2014 (UTC)
thread_title:  aka "syntactically significant whitespace" 

message: I can see that Landin did indeed spell it off-side in his Next 700 Porgramming Languages paper in 1965.  But it looks to me like sources today (including a couple I just added) tend to spell it as a single word.  In Google searches for Landin "offside rule" versus Landin "off-side rule", the unhypenated spelling is 1.48x as frequent on the web (4,680 hits versus 3,170 hits) and 4.55x as frequent in books(182 hits versus 40 hits),  This isn't a huge difference but per WP:COMMONNAME, I believe it might be enough to justify renaming the article Offside rule (programming).  Opinions, please?  Msnicki (talk) 17:10, 3 September 2015 (UTC)
replies: text: Unhyphenated is the case in [association] football and rugby, but as long as it's not offsides I can live with it. 2A02:2788:1008:6D6:E2CB:4EFF:FE88:1A2D (talk) 14:35, 18 April 2022 (UTC)

text: Spelling does change and in particular gets simplified over time. I recommend using the common spelling first and throughout along with the old spelling as a.k.a. or formerly or some such. ... but the hard part is this: how does one make such a change without falling prey to the no-original-research rule? Not that I wouldn't make the change :) but I do struggle internally with the pesky original research rule. Stevebroshar (talk) 13:23, 13 February 2024 (UTC)
thread_title:  Off-side or offside? 

message: The only example that comes to my mind is the C preprocessor. I'm not sure whether that can be considered a programming language  — Preceding unsigned comment added by 198.176.82.33 (talk) 10:08, 6 October 2017 (UTC)
replies: text: Seconded.  If you can logically replace begin...end with {...} or whatever I don't see the difference.  If some languages or implementations thereof have chosen to make it so, that's accidental not essential. 2A02:2788:1008:6D6:E2CB:4EFF:FE88:1A2D (talk) 14:38, 18 April 2022 (UTC)

text: BASIC and in particular Visual Basic use newline for special meaning. But... this point and most of the 'alternatives' section is way off topic. Stevebroshar (talk) 13:59, 13 February 2024 (UTC)
thread_title:  In some languages (but not Pascal), this means that newlines are important 

message: I haven't found a single mention of the term "off-side rule" regarding syntactically significant indentation that doesn't reference this Wikipedia article or "The next 700 programming languages". I am a software engineer, and I have never heard this term before. This site should be called "Syntactically significant indentation" (or "...whitespace", as another user has mentioned before), because that's what it is. There is no reason to call it "off-side rule", only because someone (even Peter Landin) called it that once.  — Preceding unsigned comment added by 2A02:810D:4740:8F7C:D4DE:89C3:E67E:C72 (talk) 23:36, 18 May 2018 (UTC)
thread_title:  There is no mention of this term that doesn't reference Wikipedia 

message: I wonder whether it would be worth noting that FORTRAN had an explicit significant-whitespace rule, in that originally labels had to start in column 1 of an input record (usually a punched card) and normal statements in column 7?
In addition I believe that at least some ALGOL-60 implementations treated anything after an END as a comment, stopping at end-of-line.
Both of the above are distinct from certain columns being reserved for sequence numbers. MarkMLl (talk) 08:53, 29 May 2019 (UTC)
replies: text: Hmm. IDK. I see the similarity. I'm pretty sure that whatever offside rule means was not intended to cover that aspect of FORTRAN (and punch cards). Further seems a stretch to use offside to mean that. But, could be an interesting side-note about a related factoid. In general, it's hard to organize information into neat boxes like terms and pages. So much overlap. Makes my head hurt thinking about. Stevebroshar (talk) 14:07, 13 February 2024 (UTC)
thread_title:  FORTRAN and ALGOL 

message: I think it does.  And perhaps a new scope.   The term "off-side rule" would be mentioned in the article, but should not be the focus.  I'll look to see if there is already an article that discusses the concept of a programming language or markup language that uses indentation to define blocks. - Bevo (talk) 13:06, 5 June 2019 (UTC)
replies: text: Bevo: any luck with that search :) Stevebroshar (talk) 14:09, 13 February 2024 (UTC)
thread_title:  Does this article need a new name? 

message: Section "Alternatives" mentions that "sloppily indented code might lead the reader astray, such as the goto fail bug.". While the claim is true, the goto fail bug was not caused by sloppy indentation, but rather the exact opposite: that the developers relied on indentation as opposed to brackets, in a language that uses brackets. I think that this reference should be removed. Matt-bacon-bcm (talk) 02:40, 21 June 2021 (UTC)
thread_title:  On the reference to the "Goto Fail" bug 

message: I think most of the existing Alternatives section should be deleted. It's 5 lengthy paragraphs rn about what offside is not. It's well-intentioned, but as often happens on wikipedia pages, folks incrementally add information that diverges from the central focus of the page topic. The result tortures the reader with unrelated information. A couple sentences and a few links to related topics should be enough to cover alternatives. Don't need to describe the alternatives in gory detail; just reference them. Stevebroshar (talk) 14:17, 13 February 2024 (UTC)
thread_title:  Alternatives section is way off topic 

message: Some folks have commented that 'offside rule' (off-side rule) is not a common term and the term used here should instead be something that's more commonly used. ... but what might that term be?
The page includes significant indentation and I see a comment using syntactically significant whitespace.
Here's my struggle: How can a term be chosen without doing original research? Determining which terms is the most common seems to require research, right? And most likely there is no primary or secondary source that says which term is most common. Someone can use online tools (like google) to determine which is most used in available info worldwide; but that's research, right?
FYI This must be a common struggle for wikipedia and defining terms in general. Every term has it's own connotation and the not 100% interchangeable with another term. I have struggled personally with the page function (computer programming). Stevebroshar (talk) 14:27, 13 February 2024 (UTC)
thread_title:  What is this thing? 

message: This articles covers what the offside rule is; which is good. But a major aspect of technology is that it is invented to solve a problem; to improve something that has limitations. Why was this rule invented? What limitations does it solve?
The alternatives section covers blocking syntax of other languages -- which IMO is off topic. But, a discussion of how offset is better or worse than other syntaxes would be valuable. Stevebroshar (talk) 14:38, 13 February 2024 (UTC)
thread_title:  How is it a better mouse trap?