Skip to content

[NFC] Change magic emoji to __ #35734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2021
Merged

Conversation

davezarzycki
Copy link
Contributor

@davezarzycki davezarzycki commented Feb 3, 2021

As I explained via Twitter, emoji (while fun) are annoying to work with because one cannot easily type them.

@davezarzycki davezarzycki requested a review from jckarter February 3, 2021 15:18
@davezarzycki
Copy link
Contributor Author

@swift-ci please smoke test

@davezarzycki
Copy link
Contributor Author

Ping. I'd still be nice and good if source code and tests are always editable (and analyzable with scripts) without copying and pasting magic tokens.

@jckarter
Copy link
Contributor

You don't have to copy and paste any magic tokens; if you're writing a test, you don't have to follow what the interface printer happens to do, you can use whatever identifier you like.

@davezarzycki
Copy link
Contributor Author

This isn't just about writing tests. It's about accessibility and discovery. I'm a command-line developer. Always have been. My most important tool for exploring a code base is grep (or really git grep these days). I remember tripping over this Unicode output months ago and wondering "what on earth is going on? This is so weird." Well how the heck am I going to grep for this? Is the emoji literally in the C++ code? Or is it encoded via ASCII escapes somehow? And if so, which escape technique? \u, \U, or \x? And if it is escaped, what are the hex digits involved? Finally, is this emoji an easter egg and therefore its production is obfuscated somehow?

But back to writing tests, if I'm trying to update the swift test suite and if I want to be precise, then I need to either copy-and-paste the emoji or use something like {{.*}} which feels needlessly carefree.

Look, I get it. It's fun and healthy to insert some humor into work. But can we please limit the emoji to documentation, commit messages, etc and not code or the output of code?

Also, at least on my preferred development platform, there is a difference between being Unicode correct and Unicode savvy. On Linux, I haven't run into any program with Unicode correctness issues. That being said, font support lags behind Apple's platforms, and the X11 world doesn't seem to be in any hurry to have fallback fonts for when the primary font lacks support for emoji. So at least in my terminal, I just see lots of "can't print this character" boxes (which render fine if I use the web browser, but um, thanks but no thanks).

@davezarzycki
Copy link
Contributor Author

Hi @jckarter – I assume that you remain unconvinced/unmoved. Shall I just close this?

@jckarter
Copy link
Contributor

I honestly don't care enough to block it. I'm fine with you merging this.

@davezarzycki
Copy link
Contributor Author

davezarzycki commented Mar 23, 2021

@jckarter – Thanks!

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 00533e8

@CodaFi
Copy link
Contributor

CodaFi commented Mar 23, 2021

@swift-ci smoke test macOS

@davezarzycki davezarzycki merged commit c148332 into swiftlang:main Mar 24, 2021
@davezarzycki davezarzycki deleted the pr35734 branch March 24, 2021 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants