• Faresh@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    I think they exclude some unicode characters from being use in identifiers. At least last I tried it wouldn’t allow me to use an emoji as a variable name.

      • Faresh@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        3 months ago

        That code was C++ or something like that. Not GDScript.

        I tested this on Godot 4.2.1. You can write identifiers using a different writing system other than latin and you are allowed to have emojis in strings, but you aren’t allowed to use emojis in identifiers.

        • histic@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          0
          ·
          3 months ago

          Ah I’m unfamiliar with most languages I just use python and random others for personal projects

          • bleistift2@sopuli.xyz
            link
            fedilink
            English
            arrow-up
            0
            ·
            2 months ago

            Coding must be a nightmare if you’re choosing programming languages at random 😱

            But you must also be learning quite a lot.

        • lunarul@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          2 months ago

          There’s probably a rule that requires variables to start with a letter or underscore. Emoji are nor marked as letters. Something like _👍 will probably work.