From: Maciej Sobczak <no.spam@no.spam.com>
Subject: Re: Limited_Controlled and constructor functions
Date: Fri, 19 Jan 2007 14:45:59 +0100
Date: 2007-01-19T14:45:59+01:00 [thread overview]
Message-ID: <eoqi2o$frt$1@cernne03.cern.ch> (raw)
In-Reply-To: <cbx9fhxjacak.1nwr2d9wqyafu$.dlg@40tude.net>
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/
next prev parent reply other threads:[~2007-01-19 13:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-18 9:51 Limited_Controlled and constructor functions Maciej Sobczak
2007-01-18 12:13 ` AW: " Grein, Christoph (Fa. ESG)
2007-01-18 16:41 ` Robert A Duff
2007-01-19 7:58 ` Maciej Sobczak
2007-01-19 9:41 ` Dmitry A. Kazakov
2007-01-19 13:45 ` Maciej Sobczak [this message]
2007-01-19 14:33 ` Dmitry A. Kazakov
2007-01-22 8:59 ` Maciej Sobczak
2007-01-20 17:09 ` Gautier
2007-01-20 19:39 ` Gautier
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox