Skip site navigation (1)Skip section navigation (2)
Date:      02 Apr 2002 10:47:44 +0200
From:      Paul Richards <paul@freebsd-services.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Mike Barcroft <mike@FreeBSD.ORG>, "M. Warner Losh" <imp@village.org>, jake@locore.ca, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/i386/i386 critical.c src/sys/i386/include cpufunc.h critical.h src/sys/i386/isa apic_vector.s icu_vector.s src/sys/kern kern_fork.c kern_proc.c kern_switch.c src/sys/alpha/alpha critical.c src/sys/alpha/include cpufunc.h ...
Message-ID:  <1017737264.43836.18.camel@lobster.freebsd-services.com>
In-Reply-To: <200204020814.g328EPc14858@apollo.backplane.com>
References:  <200204012351.g31NpO890339@freefall.freebsd.org> <20020401.175136.106024419.imp@village.org> <20020401201130.K207@locore.ca> <20020401.181628.15900667.imp@village.org> <200204020428.g324SkE14265@apollo.backplane.com> <20020402024209.B19806@espresso.q9media.com>  <200204020814.g328EPc14858@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2002-04-02 at 10:14, Matthew Dillon wrote:
> 
> :C99 adds even more ways to obfuscate code (for instance, allowing
> :variable declarations anywhere in a code block, not just at the top).
> :
> :Best regards,
> :Mike Barcroft
> 
>     Ha!  I did it first.  DICE allows variable declarations virtually
>     anywhere a statement is allowed.  So, for example, this works:
> 
>     for (int i = 0; i < 10; ++i) {
> 	fubar(i);
> 	int j = 2;
> 	fubar(j);
>     }
> 
>     Figuring out the difference between a statement and a declaration
>     is the *ONLY* thing in a C parser that requires some sophistication.
>     Having declarations appear only after open braces doesn't help the
>     parsing in the least... once the parser figures out the difference,
>     it's figured it out anywhere where a statement can occur.
> 
>     But even though I implemented this cool feature in DICE, I hardly ever
>     used it.

This is the norm for most Perl programmers. It often makes a lot of
sense.

Paul.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1017737264.43836.18.camel>