Sujet : 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)
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.lang.cDate : 22. Sep 2024, 17:03:17
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vcpf45$2a8u3$1@news.xmission.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
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.