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,3a7c118fd2cc64f9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: A hole in Ada type safety Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.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: <87oc3odtci.fsf@mid.deneb.enyo.de> <87tydfbtp3.fsf@mid.deneb.enyo.de> <87d3k2u36e.fsf@mid.deneb.enyo.de> <877ha2op0n.fsf@mid.deneb.enyo.de> Date: Sat, 7 May 2011 11:28:05 +0200 Message-ID: NNTP-Posting-Date: 07 May 2011 11:28:05 CEST NNTP-Posting-Host: 3e8a1b6b.newsspool3.arcor-online.net X-Trace: DXC=Q?bh70F2lkG@Y=h<_c3PkHMcF=Q^Z^V3H4Fo<]lROoRA8kF On Sat, 07 May 2011 11:09:44 +0200, Florian Weimer wrote: > Run-time complexity for reference counting is less than for full > garbage collection. Making it a language feature, rather than a > library-provided functionality, makes it easier for implementations to > optimize updating the counts. Hmm, what about tasking? I gather that a built-in counter must be atomic. Whether implemented lock-free or using a spin lock, that would be a considerable overhead. > As usual, there is a trade-off between > flexibility and overhead: if the reference counters are kept separate, > it is possible to implement weak pointers and safe references to > sub-components. Interesting. Do you have a certain schema in mind, how to this? >> Type safety is not about detering malicious programmers, merely careless >> ones. > > I think type safety is important for ending up with language semantics > that can be explained. I agree. It is the semantics which yields to safety, not the reverse. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de