Module talk:Redirect: Difference between revisions

Content deleted Content added
m Reverted edit by 103.28.116.119 (talk) to last version by Cewbot
 
(5 intermediate revisions by 5 users not shown)
Line 1:
{{WikiProject banner shell|
{{WPRED}}
{{WikiProject Redirect}}
 
}}
== Why am I confused? ==
 
Line 217 ⟶ 218:
== Protected edit request on 16 April 2023 ==
 
{{edit fully-protected|Module:Redirect|answered=noyes}}
This might be a little excessive for an edit to a fully protected module, but:
 
Line 234 ⟶ 235:
because <code>titleObj.isRedirect</code> will only ever yield "true" or "false".
([https://en.wikipedia.org/wiki/Special:ComparePages?page1=Module%3ARedirect&rev1=1043472510&page2=Module%3ARedirect%2Fsandbox&rev2=1150203250&action=&unhide=&diffmode=source diff]) {&#123;'''[[User:Lemondoge|Lemondoge]]'''&#124;[[User talk:Lemondoge|Talk]]&#124;[[Special:Contributions/Lemondoge|Contributions]]&#125;} 21:43, 16 April 2023 (UTC)
 
:Has this been tested? Scibunto manual does not explicitly say that isRedirect will be true or false. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 07:38, 17 April 2023 (UTC)
:@Lemondoge: I have noticed your edits to sandbox modules that I monitor. Thanks for the tweaks and thanks for finding the bug noted [[Template talk:Navbox#Short-circuit in ternary expression at line 143|here]]. However, I am not sure there is any benefit from optimizing code unless done as part of a significant effort by someone deeply invested in the particular module. Take this edit request—you are probably correct but who knows and who cares? It can be very challenging to verify rearrangements to boolean expressions. The original here is bulletproof. More importantly, it is easily seen to be bulletproof. I would leave it as is. It's not particularly important, but the edit request would result in uncertainty about what return values can occur while the original code removes any doubt. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 07:59, 17 April 2023 (UTC)
:: Aye, fair enough. {{Withdrawn}} {&#123;'''[[User:Lemondoge|Lemondoge]]'''&#124;[[User talk:Lemondoge|Talk]]&#124;[[Special:Contributions/Lemondoge|Contributions]]&#125;} 12:43, 17 April 2023 (UTC)