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-Thread: 103376,8591be732d0fce98 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ada OOP alternatives? Date: Fri, 18 Jul 2008 08:54:54 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <462e0cf4-1d53-4918-b30b-dd3d8df90f1b@p25g2000hsf.googlegroups.com> <487d9636$0$6543$9b4e6d93@newsspool3.arcor-online.net> <6e5uq2F5g7n6U2@mid.individual.net> <18maowv5tf52i$.winpalz4hj7p$.dlg@40tude.net> <138raucqw95gm.4bnfy7y43il7$.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1216385694 1277 192.74.137.71 (18 Jul 2008 12:54:54 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 18 Jul 2008 12:54:54 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:Xp8paKR9CffXxpG0KwKy6au+C5A= Xref: g2news1.google.com comp.lang.ada:1208 Date: 2008-07-18T08:54:54-04:00 List-Id: "Dmitry A. Kazakov" writes: > I used to review C code that packed almost 80% of executable code in the > header files... (:-)) What fun! ;-) >> I want separate specs and bodies, not for the compiler's benefit, but >> for the programmer's benefit. I want to be able to read a concise spec, >> without having to wade through the entire body. > > There are two problems with that. The first one is that the difference is > not obvious. Why legality check is less than "full compilation", so that > the delta cannot be left for the binder/linker. The second one is that if > the delta is sufficient, then the reader should probably become aware of > it. In short, it is difficult to drive a margin. I don't understand. To (e.g.) determine whether a procedure call is legal, you need to know its name, parameter types, etc. (Whether "you" is the human or the compiler.) To generate code, you need to know more -- which register to put the parameter in, etc -- and if inlined, what code is in the body. >> The compiler should check legality without looking at other bodies. But >> it should look at bodies when generating code (at least if optimization >> is turned on). > > But what would you do with dynamically linked libraries, remote partitions > and other lately bound stuff? I don't see what that has to do with organization of the source code. These things are implemented using "extra" levels of indirection at run time. E.g. you can't very will inline a call in an executable, and then expect that updating a shared library used by that executable will update the call by magic. So don't inline across such boundaries. >... I think that the time of monolithic systems > is gone. I don't think so. Certainly some embedded systems are monolithic, and should be. - Bob