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,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!blackbush.cw.net!cw.net!feed.news.tiscali.de!news.belwue.de!irazu.switch.ch!switch.ch!news.grnet.gr!newsfd02.forthnet.gr!not-for-mail From: Ioannis Vranos Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: [OT] Re: Teaching new tricks to an old dog (C++ -->Ada) Date: Sun, 06 Mar 2005 01:55:34 +0200 Organization: FORTHnet S.A., Atthidon 4, GR-17671 Kalithea, Greece, Tel: +30 2109559000, Fax: +30 2109559333, url: http://www.forthnet.gr Message-ID: <1110066940.571771@athnrd02> References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <87is4598pm.fsf@insalien.org> <1110054476.533590@athnrd02> <1110059861.560004@athnrd02> <87wtsl7jts.fsf@insalien.org> NNTP-Posting-Host: athnrd02.forthnet.gr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: athprx02.forthnet.gr 1110066940 488 193.92.150.73 (5 Mar 2005 23:55:40 GMT) X-Complaints-To: abuse@forthnet.gr NNTP-Posting-Date: Sat, 5 Mar 2005 23:55:40 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en In-Reply-To: <87wtsl7jts.fsf@insalien.org> Cache-Post-Path: newsfd02!unknown@ppp36-adsl-149.ath.forthnet.gr Xref: g2news1.google.com comp.lang.ada:8696 comp.lang.c++:44246 comp.realtime:980 comp.software-eng:4511 Date: 2005-03-06T01:55:34+02:00 List-Id: Ludovic Brenta wrote: > Ioannis Vranos writes: > >>The restriction that you imply you desire, limits flexibility. > > > Of course. That's what all these stories about shooting yourself in > the foot mean. > > >>Once again, I have nothing against learning Ada, however personally >>I like the most powerful languages. The next thing I am going to >>learn after C++ (because I haven't learned it all yet), is probably >>some form of assembly language. > > > Yes, assembly is the most powerful and flexible language. That's why > all compilers emit assembler. > > >>For example I like that I can do: > > > [...] > > in Ada, you would use an overlaid array of characters, like this: > > with Ada.Strings.Unbounded; > with Ada.Text_IO; > procedure Unsafe_Proc is > type Some_Class is record > S : Ada.Strings.Unbounded.Unbounded_String; > end record; > > Obj : aliased Some_Class := > (S => Ada.Strings.Unbounded.To_Unbounded_String > ("This is a text message")); > > Obj_As_String : String (1 .. Obj'Size / System.Storage_Unit); > for Obj_As_String'Address use Obj'Address; > begin > for J in Obj_As_String'Range loop > Ada.Text_IO.Put_Line > (Integer'Image (Character'Pos (Obj_As_String (J))) & > " " & > Obj_As_String (J)); > end loop; > end Unsafe_Proc; May you provide the output of the code? Because I can not understand much by itself. Can Ada > Then I am not interested entrusting my life to your software. I wouldn't use low-level unsafe facilities for safety-critical situations but types which have checks all over the place and RAII. -- Ioannis Vranos http://www23.brinkster.com/noicys