What previews should I enable?
Sergey
kornburn at yandex.ru
Fri May 30 06:48:27 UTC 2025
On Friday, 30 May 2025 at 00:31:56 UTC, luafyn wrote:
> Hi everyone, so dmd includes several -preview flags and I was
> wondering if there were any that are recommended to enable?
I think no
> I like using the most up to date stuff possible so I've
> actually been using -preview=all and it seems to work alright,
> but then I hit a weird issue with sumtypes and -preview=dip1021
> so I'm wondering if that's a bad idea.
>
> Some of the previews seem pretty ok to use like the bugfix
> previews but I'm not sure about the DIPs. Like, is it required
> for me to use -preview=dip1000 to have `scope` do anything, for
> example? Cheers!
DIP1000 is under discussion for dropping.
Moreover I would suggest to not consider D as a language with
plans and proper design team which have "recommended" things.
The dev team is severely understaffed and nobody is doing
high-level design work.
And if you will think about D as a language where any hacker has
some idea and some time/energy to push it - it can be added to
the language, even if it is not working well with other parts of
the language, or even if the implementation is not fully thought
and not all corner cases were properly designed.
So working with D from that perspective should help you to
properly identify preview flags as "I want this hack-feature for
my hacking". Having this in mind should better describe them and
overall D idea as a lang for lone-wolf experienced hackers.
Hope this helped to better feel D's zen
More information about the Digitalmars-d-learn
mailing list