microsoft / alguidelines

Best Practices and Design Patterns for the AL Language
https://alguidelines.dev/
MIT License
131 stars 49 forks source link

One Statement Per Line #80

Closed waldo1001 closed 2 years ago

waldo1001 commented 2 years ago

Again - not really one of my favorites.. .

I personally like to use things like:

if something then error(errorlbl);
JesperSchulz commented 2 years ago

Again - not really one of my favorites.. .

I personally like to use things like:

if something then error(errorlbl);

Nonetheless still a best practice we follow :-)

ajkauffmann commented 2 years ago

So, what about this:

exit(CallToAnotherFunction());

or

exit(Rec.IsEmpty);

or

error(GetErrorMessage())

😏

JesperSchulz commented 2 years ago

So, what about this:

exit(CallToAnotherFunction());

or

exit(Rec.IsEmpty);

or

error(GetErrorMessage())

😏

Well, that we do! So I guess there are exceptions to any rule 🙄