News for hackers. Stuff that matters.
Re:Rust for JavaScript Developers – Functions and Control Flow by amenod on Monday July 06, 2020 @02:11AM (#23745167)
True, or even:

    Cond1 // if this
      ? Result1 // return this
      : cond2 // else if this
        ? Result2 // return this
        : cond3 // else if this
          ? Result3 // return this
          : ResultElse // else return this
Re:Rust for JavaScript Developers – Functions and Control Flow by giantDinosaur on Monday July 06, 2020 @05:02AM (#23745964)
Goodness me that has potential to become something truly hideous.
Re:Rust for JavaScript Developers – Functions and Control Flow by amenod on Monday July 06, 2020 @01:11PM (#23749998)
It's actually not that bad in practice... But I guess the pragmatic formatting is "whatever `prettier` does by default" anyway. :)
Re:Rust for JavaScript Developers – Functions and Control Flow by Kkoala on Monday July 06, 2020 @08:46AM (#23747285)
It's funny how people have so many different preferences for ternary formatting. I can't think of any other operator that would have tens of different format prefs.