default implemented opAssign purity
Jonathan M Davis
jmdavisProg at gmx.com
Sun Dec 2 14:18:40 PST 2012
On Sunday, December 02, 2012 23:04:29 Dan wrote:
> On Sunday, 2 December 2012 at 19:34:46 UTC, Jonathan M Davis
>
> wrote:
> > Pretty much none of the built-in stuff like that is pure or
> > nothrow right now.
> > It needs to be fixed.
>
> Maybe I'm naive, but problems with lax specification of pure,
> const and immutable should be low hanging fruit - relatively easy
> to fix and good bang for buck. The problem with being lax in
> phobos or object is that it gives a sense of false advertising.
> Great language features with great promise as described by TDPL,
> but can't use it if not done everywhere.
What about the specification is lax? pure, const, and immutable are quite well
defined. The problem here is that it's stuff in druntime that needs to be fixed
which very few people can do, and it often runs into other problems which
makes making any of the changes incredibly difficult. For instance, to fix the
current AA implementation requires a ton of work, because it affects all kinds
of stuff all over the place in druntime, so the result is that none of it is
getting fixed right now, which obviously isn't good.
Some of this stuff is getting fixed incrementally, but it's definitely taking
longer than would be desirable, and while some of it may be low hanging fruit,
a lot of it really isn't because of how much stuff is affected. Small changes
quickly become huge ones when dealing with druntime changes - especially with
stuff like pure, const, and nothrow.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list