Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] Avoid //-style comments.

0 views
Skip to first unread message

Andy Dougherty

unread,
Mar 22, 2007, 8:59:05 AM3/22/07
to Perl6 Internals
Please avoid //-style comments. Older compilers don't understand
them.

Also, and more importantly, this section of code has several commented out
lines, but no comments explaining why those lines are commented out. It
makes it more difficult to understand.

--- parrot-current/lib/Parrot/Pmc2c/PMETHODs.pm 2007-03-17 19:15:14.000000000 -0400
+++ parrot-andy/lib/Parrot/Pmc2c/PMETHODs.pm 2007-03-21 11:56:34.730000000 -0400
@@ -439,7 +439,7 @@

/* if (PMC_cont(ccont)->address) { */
{
- //parrot_context_t * const caller_ctx = PMC_cont(ccont)->to_ctx;
+ /* parrot_context_t * const caller_ctx = PMC_cont(ccont)->to_ctx; */
if (! caller_ctx) {
/* there is no point calling real_exception here, because
PDB_backtrace can't deal with a missing to_ctx either. */

--
Andy Dougherty doug...@lafayette.edu

Matt Diephouse

unread,
Mar 22, 2007, 11:18:39 AM3/22/07
to Andy Dougherty, Perl6 Internals
Andy Dougherty <doug...@lafayette.edu> wrote:
>
> Please avoid //-style comments. Older compilers don't understand
> them.


Thanks. We have a test for //-style comments, but evidently it doesn't catch
all of our generated code. I've changed it to a C-style comment in r17692.

--
Matt Diephouse
http://matt.diephouse.com

H.Merijn Brand

unread,
Mar 22, 2007, 9:17:18 AM3/22/07
to Andy Dougherty, Perl6 Internals
On Thu, 22 Mar 2007 08:59:05 -0400 (EDT), Andy Dougherty
<doug...@lafayette.edu> wrote:

> Please avoid //-style comments. Older compilers don't understand
> them.

Not only 'older' compilers, also 'stricter' compilers.
One of my pet-peeves. Sorry. // comments are bad style.

my $a = 1 // <This is comment :)>;

> Also, and more importantly, this section of code has several commented out
> lines, but no comments explaining why those lines are commented out. It
> makes it more difficult to understand.
>
> --- parrot-current/lib/Parrot/Pmc2c/PMETHODs.pm 2007-03-17 19:15:14.000000000 -0400
> +++ parrot-andy/lib/Parrot/Pmc2c/PMETHODs.pm 2007-03-21 11:56:34.730000000 -0400
> @@ -439,7 +439,7 @@
>
> /* if (PMC_cont(ccont)->address) { */
> {
> - //parrot_context_t * const caller_ctx = PMC_cont(ccont)->to_ctx;
> + /* parrot_context_t * const caller_ctx = PMC_cont(ccont)->to_ctx; */
> if (! caller_ctx) {
> /* there is no point calling real_exception here, because
> PDB_backtrace can't deal with a missing to_ctx either. */


--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.9.x on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.0 & 10.2, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org
http://www.goldmark.org/jeff/stupid-disclaimers/

0 new messages