1. 5

Prompted by https://lobste.rs/s/zaiaip/c_what_fuck


  2. 1

    Hey Remy! Do you also use these digraphs, or only the word equivalents?

    <%          {
    %>          }
    <:          [
    :>          ]
    %:          #
    %:%:        ##
    1. 2

      No just the words. Actually only and and or. Otherwise the number of wtfs would rise quickly during code reviews…

    2. 1

      It’s in C++ since C++ 11, but MSVC requires a specific compiler flag (’/Za’) or the “iso646.h” header.

      Huh interesting! I didn’t know that. A funny thing is that the Oil language looks like this.

      It borrows its expressions from Python, but it statements from C/JavaScript:

      if (x == 1 or x == 2) {
        echo "x is one or two"

      One reason for this is && and || already mean something related but different in shell, e.g. echo one && echo two.

      I was concerned that this would throw people off coming from other languages. But now I can say it’s valid C++ :)