I saw a post from someone wanting more trans memes and took that as a sign to post one of mine.

  • XPost3000
    link
    fedilink
    English
    arrow-up
    15
    ·
    2 years ago

    “Please Input Your Gender”: Girl' ; DROP TABLE GENDERS

  • SubArcticTundra@beehaw.org
    link
    fedilink
    English
    arrow-up
    14
    ·
    2 years ago

    Nah fam Rust has you covered:

    enum Gender {
      Male,
      Female,
      Other(str&),
    };
    

    That said my Rust knowledge is shit

  • ryuko
    link
    fedilink
    English
    arrow-up
    7
    ·
    2 years ago

    Can we store gender on a quantum computer? Quibits.

    • a_random_foxOP
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      2 years ago

      I don’t think so, but i would like to hear why a float would be better. Might change my opinion.

      • magmaus3@szmer.info
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        I think the reason why is because a float would be easier to store, while having enough possibilities for such data.

        • borari
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 years ago

          Is there some array that links a specific float value to a gender? Storing something like that as a float and having to look it up outside the object itself to determine it’s actual value seems like bad practice to mezcal but I’m not a developer by trade.

  • _cnt0@feddit.de
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 years ago

    Strings are messy. I’m in favor of some covoluted struct or union.

    • Biscuit@kbin.social
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      They’re also too static. Need a user provided script to handle things like gender fluid.

  • MinekPo1
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 years ago

    :3 thanx. Hav headpats (if you wan ofc)

  • Midas@ymmel.nl
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 years ago

    In the app I’m building contacts have an Enum Sex (Male, Female, Unknown) and an Integer Gender which is a foreign key to gender table