On Saturday 25 December 2010 08:19:32 dsimcha wrote:
> I've been thinking about adding purity to various parts of Phobos and one
> thing that limits this in the case of containers is templated containers,
> arrays, etc. that may be instantiated with a user-defined type. In theory,
> even assigning
On Saturday 25 December 2010 08:50:19 dsimcha wrote:
> == Quote from bearophile (bearophileh...@lycos.com)'s article
>
> > dsimcha:
> > > Does anyone see a problem with requiring opAssign and postblits to be
> > > weakly pure to solve this problem?
> >
> > Time ago I have even suggested contracts
On Sat, 25 Dec 2010 18:46:17 + (UTC)
Tomek Sowiński wrote:
> dsimcha wrote:
> > I've been thinking about adding purity to various parts of Phobos and
> > one
> > thing that limits this in the case of containers is templated
> > containers,
> > arrays, etc. that may be instantiated with a use
Tomek SowiÅski:
> 2. Functions ought to be weakly pure by default (please don't dismiss as
> bikeshedding). It's the most common case by a large margin.
This is right. I'd like functions to be pure on default and use an attribute
like @outer() when whey aren't pure because they use mutables fro
dsimcha wrote:
> I've been thinking about adding purity to various parts of Phobos and
> one
> thing that limits this in the case of containers is templated
> containers,
> arrays, etc. that may be instantiated with a user-defined type. In
> theory,
> even assigning/copying a user-defined type co
== Quote from bearophile (bearophileh...@lycos.com)'s article
> dsimcha:
> > Does anyone see a problem with requiring opAssign and postblits to be
> > weakly pure to solve this problem?
> Time ago I have even suggested contracts (pre/post/invariants) to be pure (as
Design by Contract asks), or at l
dsimcha:
> Does anyone see a problem with requiring opAssign and postblits to be
> weakly pure to solve this problem?
Time ago I have even suggested contracts (pre/post/invariants) to be pure (as
Design by Contract asks), or at least class invariants to be const on default.
Bye,
bearophile
I've been thinking about adding purity to various parts of Phobos and one
thing that limits this in the case of containers is templated containers,
arrays, etc. that may be instantiated with a user-defined type. In theory,
even assigning/copying a user-defined type could be impure. Does anyone se