this post was submitted on 11 Oct 2024
835 points (98.5% liked)

Programmer Humor

32557 readers
559 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

cross-posted from: https://lemmy.zip/post/24335357

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 month ago (1 children)

Another guy just posted emojis in their code in the comments no idea if it actually works

[–] [email protected] 8 points 1 month ago (2 children)

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.

[–] [email protected] 4 points 1 month ago (1 children)

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

[–] [email protected] 1 points 1 month ago (1 children)

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

But you must also be learning quite a lot.

[–] [email protected] 1 points 1 month ago

I’m not choosing at random lol that would be crazy but I mostly use python and have been teaching myself go and some rust

[–] [email protected] 3 points 1 month ago (1 children)

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.