bcquality/community/knowledge
António Silva 0d5150c47b Drop the parentheses from the case false of value sets
Applies NKarolak's review suggestion: a case value set needs no parentheses
around a comparison.

Encodes the rationale in the Best Practice section, since it is a real
advantage of the pattern and is not documented elsewhere in the repo. The AL
operator hierarchy places and/xor above the comparison operators and or just
above them too, so parentheses are mandatory in an and chain — A = B and
C = D misparses without them — while a case value set has no and to bind
tighter and needs none. That inverts the precedence most developers arrive
with from C#.

Also notes in the bad sample that its parentheses are not optional, so the
two samples contrast on parentheses as well as on evaluation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 10:31:00 +01:00
..
data-modeling Add TransferFields SkipFieldsNotMatchingType guidance (#133) 2026-08-24 09:54:37 +02:00
performance Drop the parentheses from the case false of value sets 2026-08-27 10:31:00 +01:00
security Promote validated community knowledge (#105) 2026-07-14 14:20:27 +02:00
ui Promote validated community knowledge (#105) 2026-07-14 14:20:27 +02:00
.gitkeep Add .gitkeep files to community and microsoft directories; remove .gitkeep from samples 2026-04-17 06:03:14 +02:00