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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2cc84c0fee9046c0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!inka.de!rz.uni-karlsruhe.de!news.belwue.de!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Various Language Architecture Questions Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1127615832.540718.246970@g43g2000cwa.googlegroups.com> Date: Sun, 25 Sep 2005 10:53:55 +0200 Message-ID: <1lj1ewtykmmp4.j6srtz43enc4.dlg@40tude.net> NNTP-Posting-Date: 25 Sep 2005 10:53:53 MEST NNTP-Posting-Host: 688dab2a.newsread2.arcor-online.net X-Trace: DXC=8>CmIddaj0E5VQnf?UOZgEQ5U85hF6f;DjW\KbG]kaMHGSi?jHD8GO@X1A00FRLZ\F[6LHn;2LCVNI^><>f3dFYJI5<^C2S;P3G X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:5132 Date: 2005-09-25T10:53:53+02:00 List-Id: On 24 Sep 2005 19:37:12 -0700, frankgerlach@gmail.com wrote: > Is is possible to safely allocate objects on the stack and then pass a > pointer to these objects to a procedure ? Why should you? Ideally in a high-level language there should be no pointers but objects. The way objects are passed should be up to the compiler. > (The stack is very fast, but I cannot tolerate invalid references from > the heap or from "older" stack regions) > Are the common Ada runtimes performing range checks on Arrays, > including "casted" pointers ? > (Typecasting is necessary for high-performance access, This is a wrong proposition. You don't need type casting to achieve the best possible performance. Otherwise, a need in type casting just indicates weakness of the type system. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de