D's flaws
nkm1
t4nk074 at openmailbox.org
Fri Aug 24 14:11:58 UTC 2018
On Friday, 24 August 2018 at 13:34:57 UTC, Shachar Shemesh wrote:
> On 24/08/18 13:43, nkm1 wrote:
>>
>> I think Walter was talking more about "scope (failure)
>> destroy(this)" at the top of all your structs? I don't know if
>> it has some gotchas, though (as I don't use RAII in D...).
>>
>
> No, unlike what I suggest, that doesn't work without carefully
> reviewing every single place you put it to see whether the
> constructor actually supports destructing a partially
> constructed object.
>
> Shachar
So I guess you're saying you also use "= void" as default
initializer for some things. Otherwise, it's already a
requirement that all default-initialized things should be
destructible...
Yeah, I do agree that these kinds of things are not very well
supported by D. I do not agree that it means the language is
doomed (from a techincal standpoint, at least). Moving in a more
Java-esque direction ("Fast like C++ but with good GC" (so, in
reality, slower than C++ but faster than JVM)) would be a
reasonable strategy for D. Seems like it's not going to happen,
though.
More information about the Digitalmars-d
mailing list