From owner-freebsd-chat Sun Aug 10 11:46:01 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA06170 for chat-outgoing; Sun, 10 Aug 1997 11:46:01 -0700 (PDT) Received: from kithrup.com (kithrup.com [205.179.156.40]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id LAA06165 for ; Sun, 10 Aug 1997 11:45:58 -0700 (PDT) Received: (from sef@localhost) by kithrup.com (8.6.8/8.6.6) id LAA21530 for chat@freebsd.org; Sun, 10 Aug 1997 11:45:58 -0700 Date: Sun, 10 Aug 1997 11:45:58 -0700 From: Sean Eric Fagan Message-Id: <199708101845.LAA21530@kithrup.com> To: chat@freebsd.org Subject: Re: variable sized arrays and gcc Sender: owner-freebsd-chat@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> The feature will now make it into the next ANSI C version. (Along with a >> bunch of stuff that is *WRONG* and *EVIL*. But this particular feature I >> happen to like.) >Like what? The one I particularly hate, which distresses me greatly, is the C++-ish ability to declare a variable anywhere. E.g., foo() { int i; printf ("i = %d\n", i); int j; printf ("j = %d, i still = %d\n", j, i); } This is useful in exactly one situation that I can think of: for (int i = 0; i < 100; i++) { printf ("i = %d\n", i); } but even that has complications. (How do you declare multiple variables of different types?) It's not as if any existing code truly uses this -- the only code that has this is C++, and C++ is not C. It adds very little to the language, except for an ability to have even more badly written code, and will make some compilers a bit harder to write (but that's balanced by making others a bit easier to write). It's ugly. Yuck.