Блог пользователя cry

Автор cry, история, 2 года назад, По-английски

You can now name your variables with emojis in C++20 :D

Proof of C++20 submission: https://codeforces.com/contest/80/submission/140848199

It does not work in other C++ versions, such as C++17: https://codeforces.com/contest/80/submission/140847859

This is a revolutionary moment in variable naming, and an incredible breakthrough for the community <3

  • Проголосовать: нравится
  • +153
  • Проголосовать: не нравится

»
2 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится
similar one(not in Codeforces)
»
2 года назад, # |
  Проголосовать: нравится +30 Проголосовать: не нравится

I would like to know if this complies with rule #4 from "Can-do's and Can't-do's":

It is forbidden to obfuscate the solution code as well as create obstacles for its reading and understanding. That is, it is forbidden to use any special techniques aimed at making the code difficult to read and understand the principle of its work.

  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится +46 Проголосовать: не нравится

    I don't believe that it is obfuscation any more than typical 3-letter cp variable names.

    • »
      »
      »
      2 года назад, # ^ |
        Проголосовать: нравится +17 Проголосовать: не нравится

      My primary concern here is not that names make no sense to me but rather that they are hard to differentiate from one another, i.e. two 3-letter variable names visually differ way more than two similar emojis.

»
2 года назад, # |
  Проголосовать: нравится +56 Проголосовать: не нравится

Solved Watermelon problem with this powerful technique! https://codeforces.com/contest/4/submission/140885488

Finally my variables names describe its purpose

»
16 месяцев назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

Doesn't works anymore.