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,971aa11c293c3db1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-23 03:15:43 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-FFM2.ecrc.net!news.iks-jena.de!lutz From: lutz@iks-jena.de (Lutz Donnerhacke) Newsgroups: comp.lang.ada Subject: Re: Ada The Best Language? Date: Mon, 23 Jul 2001 10:12:51 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <3B59CD72@MailAndNews.com> <9j749o$lmp$7@news.tpi.pl> <9j9n9v$djt$1@news.tpi.pl> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 995883171 2467 217.17.192.37 (23 Jul 2001 10:12:51 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Mon, 23 Jul 2001 10:12:51 +0000 (UTC) User-Agent: slrn/0.9.6.3 (Linux) Xref: archiver1.google.com comp.lang.ada:10455 Date: 2001-07-23T10:12:51+00:00 List-Id: * Tomasz Wegrzanowski wrote: >In article , Lutz Donnerhacke wrote: >> * Tomasz Wegrzanowski wrote: >>>`operator=' improves readability if left side is non-trivial. >>> >>>Example: >>>A->foo[1].start.x = A->foo[1].start.x % 640; >>>A->foo[1].start.x %= 640; >> >> declare >> w : myType renames A.foo(1).start.x; >> begin >> w := w mod 640; >> end; > >That's evil and takes 5 lines instead of just 1. DECLARE w : myType RENAMES A.foo(1).start.x; BEGIN w := w MOD 640; END; >>>Compiler (at least gcc) warns when you screw formants. >> >> printf is an runtime interpreter. That's ugly. > >Almost all printfs are compile-time printfs. >Complire could as well support printf or equivalent. -------------------- t.c -------------------- #include int main(int argc, char**argv) { return printf("No of arguments %d for %s.\n", argc, argv[argc-1]); } -------------------- t.c -------------------- ~$ gcc -O9 -S t.c -------------------- t.s -------------------- .LC0: .string "No of arguments %d for %s.\n" .text .align 4 .globl main .type main,@function main: pushl %ebp movl %esp,%ebp subl $8,%esp movl 8(%ebp),%edx movl 12(%ebp),%eax addl $-4,%esp movl -4(%eax,%edx,4),%eax pushl %eax pushl %edx pushl $.LC0 call printf movl %ebp,%esp popl %ebp ret -------------------- t.s -------------------- Please refine your argument.