Increasing awareness for short-circuit evaluation consequences by SmPL disjunctions?
Hello,
Disjunctions of the semantic patch language are using short-circuit evaluation. It has got the consequence that the last element of the specified condition will only be checked if all previous parts did not match. Such a technical detail can lead to a recommended ordering of condition parts if you would like to care for optimal run time characteristics of SmPL code.
The usage incidence might be unclear for involved case distinctions. How do you think about to clarify possibilities any further for the reordering of SmPL disjunction items?
Regards,
Markus
Quoted 11 lines · Markus Elfring
Hello,
Disjunctions of the semantic patch language are using short-circuit evaluation. It has got the consequence that the last element of the specified condition will only be checked if all previous parts did not match. Such a technical detail can lead to a recommended ordering of condition parts if you would like to care for optimal run time characteristics of SmPL code.
The usage incidence might be unclear for involved case distinctions. How do you think about to clarify possibilities any further for the reordering of SmPL disjunction items?
What is unclear? The disjunction branches are not reordered.
julia
Quoted 5 lines
Quoted 3 lines
The usage incidence might be unclear for involved case distinctions. How do you think about to clarify possibilities any further for the reordering of SmPL disjunction items?
What is unclear?
* How will chances evolve to improve the software documentation for mentioned functionality?
* How often can case distinctions actually be applied in an analysed source file?
Quoted 1 line
The disjunction branches are not reordered.
Are there system configuration and software development concerns to consider just because of short-circuit evaluation?
Regards,
Markus