• Tinkle (unregistered)

    Hmm, is this C#?

    This does not work in Studio 2026, as you can not use || with bool? types.

    I was beginning to think specialRuleCode() should only be called when the user is not null.

  • (nodebb)

    It's difficult to teach junior engineers that we're here to write software, not play code golf.

  • Vera (unregistered)

    Dishonour on you! Dishonour on your cow!

  • Hans (unregistered) in reply to Tinkle

    camelCase "betaMode" and "specialRuleCode" - it's probably javascript which doesn't care about "types"

  • Sandra from InitAg (unregistered) in reply to Tinkle

    Nah, smells like JavaScript/TypeScript to me.

    Or maybe, since the guilty party is apparently a Klingon, it would be RaktajinoScript?

  • AzureDiamond (unregistered)

    looks like conditional rendering in react. the most common pattern is {cond && <Element />} because JS is a statement based language so when you use a normal if you need to put it in a function. with svelte you can just do {#if cond} <Element /> {/if}

  • (nodebb)

    To betaMode or not to betaMode.

  • (author) in reply to AGlezB

    You haven't read TDWTF until you've read it in the original Klingon.

  • (nodebb) in reply to Remy Porter

    Better Klingon than Vogon.😆

  • Taffer (unregistered)

    Don't ignore compiler/linter warnings, people!

  • (nodebb)

    If it's JavaScript it can't be very old, since the conditional chaining operator ?. is a relatively recent addition.

  • (nodebb)

    This feels like a Zen koan.

    One day Tokusan told his student Ganto, “I have two monks who have been here for many years. Go and examine them.” Ganto picked up an ax and went to the hut where the two monks were meditating. He raised the ax, saying “If you say a word, I will cut off your heads; and if you do not say a word, I will also cut off your heads.”

  • D Boone (unregistered)

    if (2 == b) || !(2 == b) {

    }

  • Peter of the Norse (unregistered)

    I agree with the comments about wanting to know what language is being used, because && || is actually faster in Node than if else. It’s weird to do it as raw source instead of running an optimizer, but there you go

  • MaxiTB (unregistered) in reply to Tinkle

    Doubt it. Its sematically incorrect, wouldnt compile and use Java naming conventions. But yeah, it would be really, really nice if the authors would include in their article the type of language and platform for context.

  • jfs (unregistered)

    But what if there is no user? Then the special mode will not run!

  • Officer Johnny Holzkopf (unregistered)

    2B || !2B && this.IsHere(theQuestion)...

  • (nodebb) in reply to Maia-Everett

    So one monk said "a" , and Ganto could not act, because the monks had neither said "a word" nor NOT said "a word"

Leave a comment on “Honorable Conjunctions”

Log In or post as a guest

Replying to comment #690746:

« Return to Article