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,92a5558d9ff5b0f2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: Brian May Newsgroups: comp.lang.ada Subject: Re: ada and final/sealed classes References: <1c2f5137.0410130438.3ea08553@posting.google.com> Date: Mon, 18 Oct 2004 10:20:28 +1000 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:F/D/3MBA+99Z6o9MrQF74pfvoFU= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: dsl-202-173-153-89.vic.westnet.com.au X-Trace: news.melbourne.pipenetworks.com 1098058814 202.173.153.89 (18 Oct 2004 10:20:14 +1000) X-Complaints-To: abuse@pipenetworks.com X-Abuse-Info: Please forward all headers to enable your complaint to be properly processed. Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!news-north.connect.com.au!duster.adelaide.on.net!news.melbourne.pipenetworks.com!not-for-mail Xref: g2news1.google.com comp.lang.ada:5379 Date: 2004-10-18T10:20:28+10:00 List-Id: >>>>> "Matthew" == Matthew Heaney writes: Matthew> onsbomma@hotmail.com (Hans Van den Eynden) writes: >> I want to prevent someone from inheriting from a type I made (for >> security purposes). I am a junior Ada programmer and I know this >> possible in Java (final class) and C# (sealed class). Is this also >> possible in Ada??? Matthew> Not really, no. Also, Ada scoping rules were designed to prevent programming errors from occurring when you accidently refer to a value without using the correct interface. Ada scoping rules were not designed to prevent an intruder from deliberately doing malicious activities, as everything runs in the same Unix process. Any security measures must be implemented by you, the programmer. e.g. split into multiple, independent processes, communicating via CORBA, SOAP, or some other protocol. This is unlike Java, where everything runs in a secure sandbox, and it is possible to check the code to ensure it doesn't break set rules. Then again, I may have misunderstood what you are trying to do. I can't see any security value in stopping someone from inheriting from a type, as creating new types has to happen at compile time (unlike Java), and if you have access to compile the code, you probably have access to everything anyway. -- Brian May