Open Ji-Peter opened 2 years ago
Are there pages recommending use of with
?
I found this archive one: https://alguidelines.dev/docs/navpatterns/3-cal-coding-guidelines/readability/nested-withs/
There are some rules that would throw an error in the future:
Use of implicit 'with' will be removed in the future. Qualify with '{0}': https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/diagnostics/diagnostic-al604
The 'with' statement is deprecated and will be removed for cloud development in a future release: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/diagnostics/diagnostic-al606
So, yes - would be recommended to not use them any longer and to convert, see: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-deprecating-with-statements-overview
With Business Central 2022 release wave 2, the AL:Go! template for creating new AL projects in Visual Studio Code, now enables explicit with statements by default, by adding the NoImplicitWith option to the features property in the generated app.json file.
Since
with
either implicit or explicit are being deprecated, shouldn't this recommend not usingwith
at all?