"body" keyword is unnecessary

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sun Nov 19 21:14:58 UTC 2017


On Sunday, November 19, 2017 21:07:53 Meta via Digitalmars-d wrote:
> On Sunday, 19 November 2017 at 12:54:37 UTC, Basile B. wrote:
> > Yeah, "no worries" but for example a few weeks ago a bug report
> > has drawn my attention:
> >
> > https://issues.dlang.org/show_bug.cgi?id=17925
> >
> > After testing some code with i've indeed observed that the
> > transition period for `do` had started...
> >
> > "since when ?" i've wondered.
> >
> > Good question, it's even not in the changelog:
> >
> > https://www.google.fr/search?domains=dlang.org&dcr=0&biw=1280&bih=635&tb
> > s=qdr%3Ay&ei=H34RWpKDPIzTgAatnqK4DA&q=body+do+site%3Adlang.org%2Fchangel
> > og&oq=body+do+site%3Adlang.org%2Fchangelog&gs_l=psy-ab.3...4014.4428.0.4
> > 779.3.3.0.0.0.0.67.190.3.3.0....0...1.1.64.psy-ab..0.0.0....0.AOIgJDEhh_
> > g
> >
> > So maybe it's wort mentioning something like
> >
> > "(formerly body, which is still allowed during ....)", because
> > there's been a communication problem with that deprecation.
>
> Yes, I'm pretty sure I created the PR to remove all references to
> `body` myself. It's part of the process; the first step is
> removing it from the documentation, because outright deprecation
> is too sudden. It's still perfectly usable, but we don't want to
> advertise it anymore.

It would have been better to explain in the documentation that body was
being phased out rather than just removing it right when the changes were
made to dmd. It's already caused problems due to folks trying to use do and
it not working with the compiler that they're using (e.g. ldc).

https://stackoverflow.com/questions/46860573/do-ldc-and-gdc-support-d-language-contracts

- Jonathan M Davis



More information about the Digitalmars-d mailing list