What features of D you would not miss?

Nick Treleaven nick at geany.org
Thu Sep 15 17:56:57 UTC 2022


On Thursday, 15 September 2022 at 13:43:01 UTC, Dennis wrote:
> - Typesafe variadic arguments 
> (https://github.com/dlang/dmd/pull/11124)

The non-array forms should be deprecated. What is `(int i...)` 
even useful for?

> - `lazy`

With or without Walter's idea of a delegate parameter returning T 
automatically wrapping an argument of type T into a delegate? 
That doesn't seem to be implemented:

implicitlazy.d(10): Error: function `implicitlazy.f(int 
delegate() d)` is not callable using argument types `(int)`

> - `alias this` inside a class

It's fine if the class is `final`.

> - old `alias type identifier` notation instead of `alias 
> identifier = type`

+1

> - `__FUNCTION__` and `__PRETTY_FUNCTION__`

Are there traits for these instead?

> - `this(this)` (postblit is superseded by copy constructor, 
> though there are still a lot of bugs)

The docs have:
WARNING: The postblit is considered legacy and is not recommended 
for new code

So we could probably add it to the deprecate.dd list for future 
deprecation when copy ctor is robust enough.

> - Redundant `__traits` such as isFloating, isIntegral, 
> isScalar, isStaticArray, isUnsigned

Redundant because of Phobos? Isn't that going to cause lots of 
template instantiations?


More information about the Digitalmars-d mailing list