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,27dc164946031512 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed00.sul.t-online.de!t-online.de!newsfeed-0.progon.net!progon.net!news-zh.switch.ch!switch.ch!cernne03.cern.ch!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Limited_Controlled and constructor functions Date: Fri, 19 Jan 2007 14:45:59 +0100 Organization: CERN News Message-ID: References: NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: cernne03.cern.ch 1169214360 16253 137.138.37.241 (19 Jan 2007 13:46:00 GMT) X-Complaints-To: news@@cern.ch NNTP-Posting-Date: Fri, 19 Jan 2007 13:46:00 +0000 (UTC) User-Agent: Thunderbird 1.5.0.9 (X11/20061220) In-Reply-To: Xref: g2news2.google.com comp.lang.ada:8326 Date: 2007-01-19T14:45:59+01:00 List-Id: Dmitry A. Kazakov wrote: > On Fri, 19 Jan 2007 08:58:54 +0100, Maciej Sobczak wrote: > >> What I want to accomplish is the functional way of building lists of >> values of variant types: >> >> P : constant Params := Make_Params(Param("Hello"), >> Param("Ada"), >> Param(12), >> Param(3.14))); > > Hmm, but should the parameters and containers of be limited types? Probably not, but... > I find > it rather natural to be able to copy parameter(s) ... I don't like to overengineer things in anticipation of usage patterns that actually might never happen. I prefer to forbid it and wait until it's asked for. I find it easier (well, I at least expected) to forbid copy semantics than to implement it. In C++ it's two lines of code or even half: class MyClass : boost::noncopyable ... ;-) > send them over IP... Then we're talking about serialization. Limited types don't forbid it. -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/