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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Why can't objects be static in Ada? Date: Tue, 16 Apr 2019 18:26:15 -0500 Organization: JSA Research & Innovation Message-ID: References: <1127d366-d36c-4abf-8590-4b8c0e2b5446@googlegroups.com> <1beabd13-0c34-4d8a-9a57-45243a07ffc4@googlegroups.com> Injection-Date: Tue, 16 Apr 2019 23:26:15 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="29644"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:56147 Date: 2019-04-16T18:26:15-05:00 List-Id: "Lucretia" wrote in message news:ed1629d2-f6d9-4bc9-b929-01f910bfe4a8@googlegroups.com... ... > Not exactly, but it would be nice to be able to know that something >which shouldn't need elaboration, doesn't use elaboration. That's the >point, >you're missing. You're confusing the concept of elaboration with execution of explicit elaboration code. Everything in Ada is elaborated at some point. If you look around the Standard, you'll see lots of statements like "The elaboration of has no effect.". is elaborated, but that elaboration does nothing. And Ada compilers don't generate code to do elaboration unless they have to. So you're only talking about a small percentage of code, which is executed only once. It's the least likely thing to matter in a program. In addition, using code rather than some sort of pre-initialization is typically smaller and can easily be mapped to ROM and uninitialized RAM in an embedded system. For most situations, it's preferable. Worrying about how memory is initialized is the height of premature optimization. Randy.