32

If you ever use emojis for variable naming, please do a favor for the whole developer community by formatting your hard drive twice and then never touching a computer again - because you're an idiot.

Seriously though, why Apple? This screenshot is from the official Swift Language documentation...

Comments
  • 1
    Now I just realized that this was already mentioned before, so here is an older post about the same thing (I didn't copy though)
    https://devrant.com/rants/646917/...
  • 2
    @irene I hate the word already - is it that self explanatory? (Pls no)
  • 7
    Class 🦆;
  • 4
    Fun fact, they didn’t add emoji support, they just have Unicode support, emojis come along for the ride.

    I agree though, it’s a bit of a nightmare to use it, imagine a find and replace 🤦‍♂️
  • 1
    It’s in the docs for showing off Unicode support
  • 3
    Anybody who allows constants, variables, definitions and/or keywords in their programming language definition to contain any character that is not part of US-ASCII-7 is a fucking cunt, and should be tarred, feathered and thrown off-planet!
  • 0
    @C0D4 Yeah, but just because one can use them doesn't mean one should!
  • 0
  • 0
    >format twice
    DoD5 or better or GTFO.
  • 0
    @Yamakuzure what about when it has to be specified at the top of the file and only is there so people from places that use umlauts and such can in strings and such?
  • 1
    @Parzi short: no.

    I am German, and I would skin anyone alive using umlauts outside of comments.

    The wrong and/or too small font/display/screen can make it difficult or even impossible to distinguish a:ä, o/ö or u/ü.
    Weird remote setups might make it impossible to type é, à, è and the like.

    In highly heterogeneous environments assuming that everyone can work with the comfortable setup you have, will most probably lead to catastrophic desasters.
  • 1
    @irene the idea of use macro to replace all Methods and variables with emojis, and only writing emojis in the real code!
  • 1
    Well, it makes perfect sense for Chinese people to code in Chinese, or for Bulgarian people to code in Bulgarian. Then you'll need the support for unicode characters.

    But in my opinion, coding should be done in English and English only, and as such a limited character set for identifiers should be more than enough.
Add Comment