Jump to content

Talk:Conditional operator

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Due to cross linked articles, two identical pages were accidentally created, kindly requesting assistance from admin or experienced user to remove this duplicate page.

Solved: Admin removed the other page.— Preceding Student342 (talk) 13:58, 9 April 2015 (UTC)[reply]

The article currently says "Conditional operators are present in many fields..." - which other fields? Dai Pritchard (talk) 14:17, 9 April 2015 (UTC)[reply]

Related Article

[edit]

This article seems closely related to ?:, should we consider merging them? DevSpenpai::talk 19:29, 28 March 2022 (UTC)[reply]

@DevSpenpai:. I agree that most of the article is about the Ternary conditional operator, and should be removed or merged into that article. The question is if there is anything left. At a glance, it seems this article only discusses Ternary conditional operator and short-circuit boolean operators. Does that mean that conditional operator should be the parent article with those two as child articles in WP:Summary style? Or should this be a disambiguation page? I think we need to review the use of the term "conditional operator" in published works to decide. Daask (talk) 21:48, 1 December 2024 (UTC)[reply]
I think Java's use of the term conditional operator for || and && is a bit of an aberration. These are usually called boolean operators, even if they have short-circuit evaluation. We don't lose much if we merge this article into Ternary conditional operator. We could move some of the Java stuff into short-circuit evaluation or Boolean expression#Boolean operators, in case it's not already there. — Chrisahn (talk) 16:14, 2 February 2025 (UTC)[reply]
On second thought... In the Java specification:
In the C# specification:
Maybe the use of some variation of "conditional operator" for && and || is more common than I thought. — Chrisahn (talk) 16:52, 2 February 2025 (UTC)[reply]
Maybe we shouldn't merge this page into ternary conditional operator but convert it to a disambiguation page with a short explanation of the subtleties of the term conditional operator, and links to short-circuit evaluation, Boolean expression#Boolean operators, and ternary conditional operator. — Chrisahn (talk) 17:05, 2 February 2025 (UTC)[reply]
I am the one who set the banner to suggest merging. I think the plan about the disambiguation page is good! The finding about the conditional-and operator (-or operator) is interesting, perhaps one should also refer to the page conditional (computer programming). Conditional evaluation (redirect does not exist yet) seems like just another way to say that not everything is evaluated. Short circuit evaluation seems to be a special form of conditional evaluation. 2003:E6:C72D:D900:B3F4:6CFF:1F83:DE11 (talk) 07:54, 3 February 2025 (UTC)[reply]