C++ launched its community survey, too
Nick Treleaven
nick at geany.org
Wed Mar 7 15:52:19 UTC 2018
On Wednesday, 28 February 2018 at 20:01:34 UTC, H. S. Teoh wrote:
> As Andrei wrote in TDPL, (and I paraphrase,) it sucks when
> built-in types have magical abilities inaccessible to user
> code. This is a common defect in many programming languages...
> the "magical" behaviour is wonderful when it works. But if you
> need something that said "magic" doesn't cover, you're left up
> the creek without a paddle. In D, however, you're given the
> tools to build your own equivalents of language built-ins.
Not true for implicit construction of a user-defined type. So you
can't have a `struct Pointer` wrap a pointer fully because you
can't pass null to a function taking a Pointer. You can't do the
same for Algebraic element types, they're not Algebraic. In C++
you can, but it's by default, so you get implicit construction
even when the *type author* didn't intend it to work.
More information about the Digitalmars-d
mailing list