• Modern text editor - 'bout time someone paid attention to keeping the thread title relevant!!! (Was: how to make a macro work as a single line if stmt without braces)

    From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.lang.c on Sun Sep 22 16:03:17 2024
    From Newsgroup: comp.lang.c

    In article <20240922080605.59@kylheku.com>,
    Kaz Kylheku <643-408-1753@kylheku.com> wrote:
    ...
    My super advanced text editor from the future isn't letting me do that:

    if (failed)
    WARN("failed because...");
    else
    ok++;
    attempts++; // automatic deindent

    When I add a line after ok++, it deindents it to be at the same
    indentation level as the if, before letting me type any content into it.

    OK, I lied about the super advanced from the future. It's just Vim.

    Also GCC has been able to diagnose misleading indentation for some
    years now.

    Between those two, there is nothing to worry about; just concentrate on >whether it looks prettier without the braces or with.

    Actually, there are more than a few C shibboleths that date back to the days
    of yore when both editors and C compilers were a lot less capable than they
    are today - with the result being, as you imply, that they are, nowadays, pretty much irrelevant.

    One such example is the old chestnut of:

    if (a = 0) ...

    My old Turbo C compiler caught this back in 1987.

    And yet people still talk about it today.
    --
    When I was growing up we called them "retards", but that's not PC anymore.
    Now, we just call them "Trump Voters".

    The question is, of course, how much longer it will be until that term is also un-PC.
    --- Synchronet 3.20a-Linux NewsLink 1.114