8

Programming evolution

Comments
  • 12
    //After a decade

    let getSex = (n) => ["Female","Male"][n];
  • 5
    It should not be an int, but an enum.
    And a static string is badly localizable.
  • 3
    You are missing some of the new sexes 🤣🤘
  • 1
    Females come first 🤔 I see what you did there
  • 1
    ArgumentNullException: Sex returned null.
  • 2
    I guess this is Java, and if there’s one thing I learnt in my 1 year of using java: USE FUCKING ENUMS
  • 0
    Got to third form so very quickly, that lambda conditional operators are so frigg concise...

    And please use enum or at least a printable char cuz magical ints are gross heresy.
Add Comment