News for hackers. Stuff that matters.
Re:Lua, a Misunderstood Language (2021) by UncleEntity on Friday September 30, 2022 @10:15AM (#33035123)
++ is useful to switch over the items of a string:

  switch (x++) {
      case ‘+’:
          if (x == ‘+’) {
              op = OP_INC;
              x++;
          } else if (x == ‘=‘) {
              op = OP_ADDEQ;
              x++;
          } else {
              op = OP_ADD;
          }
          break;
       …
  }

There are no comments on this comment yet.