I created a small library for Ruby/Rails that aliased a few methods with emojis. You could remove database objects by using the gun emoji, or trim a string with the scissors emoji.
IMO, it's not a "bad idea". Code is meant to be read, not written. If it renders the code more readable, then that's a win. But obviously, whether those symbols actually make the code more readable is debatable.
> whether those symbols actually make the code more readable is debatable.
In general, it would be rather silly to use greek letters for variable names. Yet sometimes, they tend to make numerical code much more readable when you are copying a mathematical formula verbatim.
Compare using "πθ" versus "M_PI*theta" several times on the same formula, for example.
yes, I want to use them in C. It is possible with clang but, unfortunately, not with gcc. I also want to be able to type them into TeX, both in math mode and in text mode, without much fuss.
\theta doesn't seem that bad. Typing something like \kissyface or \poop seems better than clicking around or typing a numeric code, albeit with the usual name guessing problem.
On OS X, and I assume others, you can add items to be automatically replaced, so something like "!t" could become a unicode theta if you want.
Purescript does the same thing (some people like using Unicode symbols for “forall” and function arrows) and it’s also led to amusing github goofs: https://github.com/i-am-tom/purescript-prelewd
In the book Diamond Age by Neal Stephenson the future working class are functionally illiterate so everything is communicated by emoji. Funny, but also a little bit frightening.
Agreed... though, I'd imagine the mostly us-ascii centric programming model might be harder for some foreign languages. The worst, for me, as an example is when I see a special non-us character for JS examples as the assigned variable for a library.
edit: on the flip side, it's pretty cool for passphrases (where allowed)
The most-used emojis are designed as a language of emotions, making them ill-suited for most programming projects. But that doesn't mean that there aren't emojis that would be very useful in programming. Emojis just aren't used because we lack good input methods for them (outside of smartphones)
I remember a few years back a common hackathon project was to use lex and yacc to make emoji languages. It was always cool to see what people do with that. Maybe there will be an APL or something with emoji.
My take is that it's only a matter of time before emojis creep into every area where text is used.
Let's hope they won't ever become a mainstream part of programming languages.