5 ms·
The spirit is there definitely. 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
by Tade0 8y ago
The spirit is there definitely.
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.
- reaperducer 8y agoLet's hope they won't ever become a mainstream part of programming languages. If you consider Amp mainstream, or a programming language, it’s already too late.
- Lukas_Skywalker 8y agoI 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.
- enriquto 8y ago> Let's hope they won't ever become a mainstream part of programming languages. knowing a few people in this world, I am sure that this will certainly happen way before you can have variables named α, β, γ
- ForHackernews 8y agoYou can already use Greek letter variable names in Python: https://stackoverflow.com/questions/17043894/what-unicode-symbols-are-accepted-in-python3-variable-names https://stackoverflow.com/questions/17043894/what-unicode-sy... I've used θ in code dealing with angles before.
- enriquto 8y agoyes, 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.
- dubya 8y ago\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.
- codedokode 8y agoThat's a bad idea. How are other developers supposed to type this character (unless they are from Greece)?
- roblabla 8y agokeep it in the copy paste buffer, obviously /s. For an even more extreme version, look at Perl6's atomic operators: https://docs.perl6.org/language/unicode_ascii#Atomic_operators https://docs.perl6.org/language/unicode_ascii#Atomic_operato... (or any other operators on this page for that matter). 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.
- enriquto 8y ago> 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.
- 8y ago
- deleted 8y ago[deleted]
- conanite 8y agoHN strips out emoji... but this works in ruby (replace "<emoji>" with a smiley for example) def <emoji> puts "helloworld" end <emoji> > helloworld
- pault 8y agoIn 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.
- tormeh 8y agoEh, emoji is just pictographic script anyway.
- toastking 8y agoI 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.
- sfoley 8y agoIt’s too late. My company has a database where the name is the sunglasses emoji.
- dguo 8y agoCheck out Emojicode: https://www.emojicode.org/ https://www.emojicode.org/ "Emojicode is an open-source, full-blown programming language consisting of emojis."
- aasasd 8y agoTell ya what, there's a Lisp dialect made with emojis.
- wongarsu 8y agoThe 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)
- RandallBrown 8y agoSwift lets you use any unicode characters, so emoji are perfectly valid variable names. I've seen some "cute" github projects that use them, but they're obviously not for real life use since emojis are tough to type.
- intuitionist 8y agoPurescript 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 https://github.com/i-am-tom/purescript-prelewd
- tracker1 8y agoAgreed... 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)