develooper Front page | perl.perl5.porters | Postings from January 2002

Re: [PATCH] from the non-ANSI comment police (was: it won't compile on win32)

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
January 3, 2002 06:46
Subject:
Re: [PATCH] from the non-ANSI comment police (was: it won't compile on win32)
Message ID:
20020103164621.A31418@alpha.hut.fi
On Thu, Jan 03, 2002 at 11:48:06AM +0100, H.Merijn Brand wrote:
> On Sun 30 Dec 2001 03:19, Jarkko Hietaniemi <jhi@iki.fi> wrote:
> > On Sat, Dec 29, 2001 at 06:15:01PM -0800, Gurusamy Sarathy wrote:
> > > On Sat, 29 Dec 2001 23:37:51 +0200, Jarkko Hietaniemi wrote:
> > > >> Patch looks harmless as C++ has /* */ too.
> > > >> 
> > > >> ..../win32/...
> > > >> are not needed as all Win32 compilers have to handle // as a comment
> > > >
> > > >Yes, but having // in the code teaches bad habits.
> > > 
> > > For C code, yes.  For C++ code, no.  (win32/vmem.h and most of
> > > win32/perlhost.h are C++.)
> 
> I checked files that had both // and /**/ comment styles. And concluded that
> those files are to be considered for // => /**/ changes.
> 
> l1:/pro/3gl/CPAN/perl-current/win32 108 > grep '/\*' vmem.h | wc -l
> 89
> l1:/pro/3gl/CPAN/perl-current/win32 109 > grep '/\*' vmem.h perlhost.h | wc -l
> 130
> l1:/pro/3gl/CPAN/perl-current/win32 110 >
> 
> > Since it's okay to define say, class constructors on C++ it's okay to
> > use them in C, too? :-)  But I see your point.
> 
> What about the Netware folder. Are those C++ too? grep reveals both /* */ and
> // ways of comments. Should I have a go at NetWare, or is that going to start
> a riot ?

I think the NetWare folks know the best - ask them.

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About