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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2cc84c0fee9046c0,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g43g2000cwa.googlegroups.com!not-for-mail From: frankgerlach@gmail.com Newsgroups: comp.lang.ada Subject: Various Language Architecture Questions Date: 24 Sep 2005 19:37:12 -0700 Organization: http://groups.google.com Message-ID: <1127615832.540718.246970@g43g2000cwa.googlegroups.com> NNTP-Posting-Host: 84.160.217.117 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1127615837 14412 127.0.0.1 (25 Sep 2005 02:37:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 25 Sep 2005 02:37:17 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g43g2000cwa.googlegroups.com; posting-host=84.160.217.117; posting-account=ZCA59A0AAADCD0-GRNk90864t_LWSIAi Xref: g2news1.google.com comp.lang.ada:5123 Date: 2005-09-24T19:37:12-07:00 List-Id: Hello, I am contemplating to create a new language, which is supposed to be as fast as C++, but as safe as Java. Maybe Ada is already fulfilling these requirements, so I have a few questions: Is is possible to safely allocate objects on the stack and then pass a pointer to these objects to a procedure ? (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, but I want to be safely in bounds of the array all the time) Also, it should be forbidden (by compiler or runtime) to cast a type that contains a pointer to a different type. Does Ada support this ? (I must secure pointers in order to have only valid pointers in the system. Invalid pointers introduce random errors or security problems for a sandbox execution model)