Yep, main returns an int in C++. It’s for the return code - if it returns 0, that indicates the program ran ok, if it returns anything else some sort of error occurred.
Imagine how much more readable it would be if you could break a loop with 💀 or return true with 👍. Or use ❓for ifs, or ↔️ for switch (the emoji didn’t work for that one). Or use an emoji to represent a custom object?
Maybe the ECMA should get on that!
Edit: I guess you can use emojis for custom objects in js.
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
Now imagine the poor sod who gets this as an interview question
“Please extend the following code in the same code style to sort [😀,😃,😄,😁,😆] using bubble sort”
I didn’t bother trying to see what an output would be, but this is a nightmare.
Oh no, now I’m going to notice you in, like, every thread!
Hahaha, I’m inevitable! The nostalgia is too powerful!
https://esolangs.org/wiki/Emoji
💩
🍊
🍉
🍉
🍍
🍎
Mojo prepared me for this with their filename extension .🔥
Assembly but the commands are emojies🤯
Wow that’s horrible. They’re using c++.
If you really need some nightmare fuel, some of us use c++ every day and even enjoy it.
it’s hard to believe…
i’m not used to c++ but…
int main()
?Yep, main returns an int in C++. It’s for the return code - if it returns 0, that indicates the program ran ok, if it returns anything else some sort of error occurred.
that actually makes sense. thanks for that explanation.
http://emojicode.org/
What?
It would be great to use some emojis in coding.
Imagine how much more readable it would be if you could break a loop with 💀 or return true with 👍. Or use ❓for ifs, or ↔️ for switch (the emoji didn’t work for that one). Or use an emoji to represent a custom object?
Maybe the ECMA should get on that!
Edit: I guess you can use emojis for custom objects in js.
Edit 2: ➡ for console.log
emacs lisp already lets you use the full range of unicode.
Sorry, I meant ECMAScript
Programming typefaces with ligatures are a step in this direction.
I would try this in something like Haskell, where some of the more exotic character sequences get tricky to recognise.
Unison might be the best language to test this in. Having identifiers separate from the actual definitions, you can call anything whatever you want.
You’d still be left with the brackets and braces though. It might make more sense in a whitespace-based language pike Python
I see your point. Personally, I like the brackets and braces, they help organize. Or maybe that’s just what I’m used to.
@erogenouswarzone
https://github.com/StavromulaBeta/emoji-apl
@Shady_Shiroe
Is 👀 even defined?
Yes, line 28 defines 🍴which defines 👀 and all the structs inherit from 🍴
Brand new sentence.
Haha did the same thing years ago to make the code look like free flowing text.
This… this… this is… GENIUS.
Utter madness, sure. Genius nonetheless.
Genius honestly
Can you string match emojis