From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5a97e6705e234408 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-24 10:09:50 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Expected bytes per sloc (semicolons) performance Date: 24 Sep 2001 13:03:13 -0400 Organization: NASA Goddard Space Flight Center Message-ID: References: <8f23da36.0109181403.52128d70@posting.google.com> <_hRp7.7630$ot.1153235@typhoon.ne.mediaone.net> <8f23da36.0109201115.2f708535@posting.google.com> <3BAB8028.18CCD530@yahoo.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1001351081 10267 128.183.220.71 (24 Sep 2001 17:04:41 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 24 Sep 2001 17:04:41 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:13295 Date: 2001-09-24T17:04:41+00:00 List-Id: default writes: > Mats Weber wrote: > > > > >Rules about n bytes per sloc are just too processor, compiler, and > > >coding style dependent to be useful. > > > > I would put a big emphasis on coding style here. If you use a lot of > > generics, the code will be generated once for each instance in most > > implementations. > > I agree there is a relation between coding style and bytes/sloc. > > But I don't understand the specific denigration of generics, which I've > heard occasionally. It seems to me the alternative to generics is > nearly-duplicate packages and procedures, usually created by brute-force > cut-and-paste in a text editor. You end up with the same amount of > object code, but with the disadvantage that it is harder to maintain > than if you had used generics. > > Is there a flaw in my reasoning? I didn't get a "denigration of generics" from this. Mats is merely pointing out that a style that uses generics will have a _much_ higher number for bytes/sloc than a style that doesn't. This is neither bad nor good; it's just a fact. It does argue that "bytes/sloc" is not a useful measure. It could also be that a particular application domain will lend itself more to generics than some other domain, independent of programmer style. The one reason I have sometimes not used a generic was when the debugger did not support them. This was true for Alsys Ada, and is still true for Tartan Ada (both Ada 83). The GNAT debugger supports generics; I'm not sure of other current compilers. -- -- Stephe