Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #14762

Re: Is Perl written in C?

From Miles Bader <miles@gnu.org>
Newsgroups comp.lang.c++
Subject Re: Is Perl written in C?
Date 2012-03-06 08:38 +0900
Message-ID <87vcmimxdt.fsf@catnip.gol.com> (permalink)
References (6 earlier) <jiv42n$8u9$1@news.albasani.net> <4f533c42$0$3068$7b1e8fa0@news.nbl.fi> <jj06fa$u8p$1@news.albasani.net> <25425852.104.1330937607179.JavaMail.geo-discussion-forums@vbne13> <jj2l09$6ro$1@news.albasani.net>

Show all headers | View raw


BGB <cr88192@hotmail.com> writes:
>> one-class-per-file is quite a common way to package C++. I wouldn't
>> describe it as Java-like.
>
> it is found in some code-bases, but is far from universal.
> for example, Doom3 is C++, and it doesn't follow this convention.
> likewise for many other programs using C++.

He didn't say it was universal, he said it was quite common.
Which is true... [obviously the existence of counter-examples doesn't
invalidate that!]

> C++ code using one-class-per-file tends to gain a vaguely Java-like
> appearance, or at least brings up the annoyance of having to open up
> lots of text editors in order to look over the code.

I've found one-class-per-file style organization to be _vastly_ more
usable, actually, because you always have a pretty good idea where
things are.

By contrast, I've had miserable (and memborable) experiences trying to
browse code written in a "stuff tons of classes in each file" style,
because I could never really be sure where to find a given class.

Obviously the above is my personable experience, and maybe yours has
been different.  Really the important thing is _some_ kind of consistent
and simple mapping between class and location.  It doesn't have to be
one-class-per-file; if a source-base has coarser-grained units than
classes that can reasonably fit into files, those would work too.  But
_something_....

[Beyond that, I guess it depends on your environment; if your text
editor is particularly bad at opening new files, but is good at
searching, then big files may seem nicer.  Conversely, an editor that
is particularly good at file browsing may make smaller files seem more
pleasant.]

-miles

-- 
「寒いね」と話しかければ「寒いね」と答える人のいるあったかさ [俵万智]

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is Perl written in C? Man-wai Chang <toylet.toylet@gmail.com> - 2012-03-03 22:15 +0800
  Re: Is Perl written in C? Paavo Helde <myfirstname@osa.pri.ee> - 2012-03-03 08:38 -0600
    Re: Is Perl written in C? Man-wai Chang <toylet.toylet@gmail.com> - 2012-03-03 22:41 +0800
    Re: Is Perl written in C? Man-wai Chang <toylet.toylet@gmail.com> - 2012-03-03 22:43 +0800
      Re: Is Perl written in C? Sam <sam@email-scan.com> - 2012-03-03 09:23 -0600
        Re: Is Perl written in C? Andy Champ <no.way@nospam.invalid> - 2012-03-03 17:08 +0000
          Re: Is Perl written in C? Juha Nieminen <nospam@thanks.invalid> - 2012-03-04 07:02 +0000
        Re: Is Perl written in C? BGB <cr88192@hotmail.com> - 2012-03-03 12:08 -0700
        Re: Is Perl written in C? jacob navia <jacob@spamsink.net> - 2012-03-03 20:45 +0100
          Re: Is Perl written in C? William Ahern <william@wilbur.25thandClement.com> - 2012-03-03 19:13 -0800
            Re: Is Perl written in C? BGB <cr88192@hotmail.com> - 2012-03-04 00:01 -0700
              Re: Is Perl written in C? Juha Nieminen <nospam@thanks.invalid> - 2012-03-04 09:56 +0000
                Re: Is Perl written in C? BGB <cr88192@hotmail.com> - 2012-03-04 09:48 -0700
                Re: Is Perl written in C? nick_keighley_nospam@hotmail.com - 2012-03-05 00:53 -0800
                Re: Is Perl written in C? BGB <cr88192@hotmail.com> - 2012-03-05 08:08 -0700
                Re: Is Perl written in C? Miles Bader <miles@gnu.org> - 2012-03-06 08:38 +0900
                Re: Is Perl written in C? BGB <cr88192@hotmail.com> - 2012-03-05 17:06 -0700
                Re: Is Perl written in C? Miles Bader <miles@gnu.org> - 2012-03-06 10:00 +0900
                Re: Is Perl written in C? BGB <cr88192@hotmail.com> - 2012-03-05 19:35 -0700
                Re: Is Perl written in C? Juha Nieminen <nospam@thanks.invalid> - 2012-03-06 09:29 +0000
                Re: Is Perl written in C? BGB <cr88192@hotmail.com> - 2012-03-06 09:20 -0700
                Re: Is Perl written in C? Ian Collins <ian-news@hotmail.com> - 2012-03-06 13:35 +1300
                Re: Is Perl written in C? BGB <cr88192@hotmail.com> - 2012-03-05 19:24 -0700
            Re: Is Perl written in C? Juha Nieminen <nospam@thanks.invalid> - 2012-03-04 09:58 +0000

csiph-web