Would this be a useful construct to add to D? auto for constructor call.
ryuukk_
ryuukk.dev at gmail.com
Tue Jan 23 11:11:00 UTC 2024
On Tuesday, 23 January 2024 at 06:30:08 UTC, Jonathan M Davis
wrote:
> That being said, I expect that it would be pretty easy to write
> a mixin to do something like that if you really wanted to.
> Also, if you're simply looking to not have to name the type,
> you could do
>
> dataGrid = new typeof(datagrid)(15);
>
> - Jonathan M Davis
You like to turn off people before they get the chance to develop
further, this is bad
You should try more languages, it'll be eye opener
``dataGrid = new typeof(datagrid)(15);`` is both, verbose and ugly
Besides, you seem to have missed this:
https://github.com/dlang/DIPs/blob/e2ca557ab9d3e60305a37da0d5b58299e0a9de0e/DIPs/DIP1044.md
https://github.com/dlang/dmd/pull/14650
It could be expanded with structs/classes
So your "it can't be done" argument is already wrong
More information about the Digitalmars-d-announce
mailing list