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,e859f774bbb3dfb3 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!198.186.194.250.MISMATCH!news-out.readnews.com!news-xxxfer.readnews.com!panix!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: another way to shoot yourself in the foot? Date: Fri, 20 Jun 2008 15:27:19 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <54157920-377a-441b-9b0b-f0c4f9ddffec@f36g2000hsa.googlegroups.com> <54435596-5e7f-4686-a2b7-1e22d7c4b186@p25g2000hsf.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1213990039 26933 192.74.137.71 (20 Jun 2008 19:27:19 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 20 Jun 2008 19:27:19 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:9AHljhjY4N7qiojPP+VRf4ULtMU= Xref: g2news1.google.com comp.lang.ada:789 Date: 2008-06-20T15:27:19-04:00 List-Id: christoph.grein@eurocopter.com writes: > Since Some.Object is limited, Factory must construct in place. The > normal return statement produces a copy ... I haven't followed this whole thread, but I'd just like to point out that a simple return statement: return ; is equivalent to an extended return statement: return Result : constant T := do null; end return; where T is the result subtype of the function (presuming Result doesn't conflict with something else around the place). Build-in-place is determined by the type, not by the syntactic form of the return statement. - Bob