Operator overloading or alternatives to expression templates
Ola Fosheim Grøstad via Digitalmars-d
digitalmars-d at puremagic.com
Mon Sep 14 12:58:20 PDT 2015
On Monday, 14 September 2015 at 19:35:39 UTC, Timon Gehr wrote:
> Furthermore, having arbitrary designed-in irregularities is not
> comparable to implementing a system whose emergent behavior is
> not understood sufficiently well. (D is guilty of both, but the
> former is much easier to fix than the latter.)
Well, D1 was a restrictive design that made C++ style programming
simpler and less error prone (sans compiler bugs). D2 is a
flexible and complicated package and thereby those restrictions
cause disharmony. It is basically too incompatible design
philosophies that are brought together.
Like in D1 it would make sense to say "the language provide the
essentials, don't design your own pointer types", whereas in D2
it makes sense to say "all features should be library based". I'm
a bit miffed that it is difficult to built proper smart pointer
types in D2.
> Both C++ and Scala have accidentally Turing-complete type
> systems.
Yes, not sure how smart that is in terms of maintainable code.
There is a reaction against overdone type systems that sometimes
can be more of burden as programs age/grow (e.g. C++/Boost), so
now we see gradual typing, deliberately unsound type-systems etc.
More information about the Digitalmars-d
mailing list