Talk:Conditional (computer programming)

message: It would be great if this article mentioned, briefly, how this is done in binary.  Nothing major, but I think a small discussion about operators and how the AND, NOT, and OR operators work to evaluate and If...Then statement.  Sir Isaac Lime 16:36, 19 July 2006 (UTC)
thread_title: Binary

message: This page should also include examples of IF statements in the Wiki markup language. Robert Elliott 07:09, 28 January 2007 (UTC)
replies: text: That would be self reference, which would violate NPOV. If we did that, we'd have to include statements in all languages. A dab link could however be used to direct the reader to a page in the WP: namespace. Richard001 20:17, 3 February 2007 (UTC)
replies: text: It should at least containa link to how to do IF-ELSE statements in Wiki markup language, for people who are desperately seeking the information and thought that the best known WIKI might be able to help. Cry.  —Preceding unsigned comment added by 142.179.253.216 (talk) 00:07, 26 August 2008 (UTC)
thread_title:  If statements in Wiki markup language. 

message: The article mentions else-if constructs without covering the dangling-else problem, even though C/C++ is shown in examples & the cross reference and it can occur in those languages.  Also, in section Conditional_statement#Else_If_parts the assertion is made that elseif, in Ada, is simply syntactic sugar for else followed by if, which is incorrect.  A brief description of the the dangling-else problem and how the Ada syntax avoids it can be found here.  Does anyone object  to adding material on dangling-else and correcting the assertion on Ada syntax?  Tslavens 23:13, 3 July 2007 (UTC)
replies: text: There already is an entire article on Dangling else; this article should definitely either link to it, or perhaps a merge may make sense.  As for as the Ada example goes, the 'elseif' is in fact just syntactic sugar, but not as its described; the description needs fixed.  Also note that other languages, like Python, have an 'elif' which is needed because of the lack of curly-braces or other means to delimit a sequence-of-statements, but it certainly does not suffer from a dangling-else problem....so there may be different motivations for an else-if than just the Ada case. - Dmeranda 15:23, 5 July 2007 (UTC)
thread_title:  Ada elsif and the dangling-else problem 

message: * This article should pbbly point to Clause (logic), somehow. --Jerome Potts (talk) 14:39, 13 March 2009 (UTC)
thread_title:  missing links 

message: Is there a good reason to discuss Guard (computing) separately from Conditional (programming)? --Abdull (talk) 13:23, 5 October 2010 (UTC)
replies: text: I certainly agree that it should be discussed in this article. However, I think the guard article is substantial enough to remain a distinct article, so the same technique as with pattern matching could be used - write a short section here, with a main article link to the Guard article.--greenrd (talk) 20:58, 5 October 2010 (UTC)
thread_title:  Guard vs. conditional 

message: This page is only part of Control flow, no reason to duplicate every paragraph to separate page IMO.
Current content of the Conditional (computer programming) is 70% duplication of Control flow.
For example, we don't have Restart loop (it was covered at Control_flow#Restart_loop) because it is trivial.  Ushkin N (talk) 04:55, 22 May 2016 (UTC)
thread_title:  Merge to [[Control_flow#If-then-.28else.29_statements]] 

message: "If-statement" or "if statement"? The article uses both. It seems to me that it should be the latter. https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style#Hyphens  — Preceding unsigned comment added by Arvidj (talk • contribs) 12:18, 6 December 2017 (UTC)
thread_title:  If-statement or if-statement 

message: A branch is just a low level instruction representation of a conditional.  A branch is a jump based on the status register, the state of the status register is set by evaluating a condition. Ethanpet113 (talk) 06:32, 18 November 2018 (UTC)
replies: text: A conditional is a language-specific expression that may or may not cause branching. Branching is the process by which a conditional expression -- when evaluated and deemed in need of a switch to an alternative instruction stream -- is implemented in hardware. Branching can also be unconditional, which involves the same hardware mechanism but has nothing to do with conditionals. This article is all about the conditional expressions, whereas branch is primarily concerned with the hardware mechanism behind unconditional and conditional branching. IMO, this seems like a reasonable way to address two distinct topics. Lambtron talk 16:48, 18 November 2018 (UTC)
replies: text: There is one place where I found it tempting to draw an explicit connection between these two topics, and that's when it is mentioned some programming languages can only do conditional GOTOs, which is isomorphic to a conditional branch instruction, with line numbers instead of (instruction) memory addresses. Intellec7 (talk) 08:18, 19 April 2020 (UTC)
thread_title:  Proposed merge with [[Branch (computer science)]] 

message: I'm not sure articles should be merged, but they should at least mention each other.
https://en.wikipedia.org/wiki/Conditional_loop  — Preceding unsigned comment added by 89.20.8.187 (talk) 01:50, 7 May 2020 (UTC)
thread_title:  Conditional loops 

message: The article says that "the combination of this expression, the If and Then surrounding it, and the consequent that follows afterward constitute a conditional statement". But hey, aren't If and Else (that is, just two words) conditional statements on their own?  — Preceding unsigned comment added by 178.71.129.19 (talk) 17:07, 9 May 2020 (UTC)
thread_title:  What is conditional statement? 

message: The pattern matching abilities in Python 3.10 can be used syntactically and functionally as switch statements. "switch–select–case" and "Pattern matching" should probably be "yes".
SwampMaster2160 (talk) 20:13, 10 March 2022 (UTC)
thread_title:  Why are we putting "no" for switch statements for python? 

message: I have recently read (here) that John McCarthy invented conditionals in his development of Lisp. This sounds reasonable to me, given what I know of the history of programming languages, but I came here hoping to find some source for this. Presently, this article doesn't have a history section, however, there is a sub-section for the history of if-then statements which has no citations, is vague, and implies that conditionals weren't invented until the 1980s. I think this page would be improved with a more comprehensive History section (with citations of course). I don't feel particularly qualified to write such a section, though I think McCarthy's cond should be mentioned (I noticed that the See Also section links to McCarthy Formalism.) and this would be a good place to include the distinction between conditionals and Branching. For now, I'll just add a citation needed, but maybe I'll start the section if no one else does. Shawsa7 (talk) 20:39, 11 January 2023 (UTC)
thread_title:  History - the cond expression in McCarthy's Lisp 

message: It says (in the section about the now obsolete three-way arithmetic IF) "In practice it has been observed that most arithmetic IF statements referenced the following statement with one or two of the labels."
Wouldn't that have been inevitable, since there would have been no other way to reach that part of the code? IMO, this points toward a design flaw in this construct (No fall-through) that programmers must have been aware of. If so, this means that "In practice it has been observed …" does not reflect this state of affairs. 2A02:A440:948D:1:786C:C600:E3CC:B643 (talk) 22:20, 31 October 2023 (UTC)
thread_title:  Arithmetic IF (pre Fortran 90) — choice of words