No, it doesn't. The standard way is exactly the same length, so no such shorthand would be justified probably. Consider the usual syntax:
if (condition) return;
vs. a hypothetical:
return if (condition);
A possible reason for introducting such a 'reverse' syntax would be that the primary intent were expressed first. Because of left-to-right reading, then it would be easier to understand, leading to more readable code.
From a language design perspective, it would make sense using a different keyword such as when in order to prevent confusing bugs. Consider the following two lines of code:
return // missing ; here
if (condition); // no warning (except empty 'then' part)
should probably have been written as:
return; // ; here present
if (condition); // unreachable code warning here
From a character-saving perspective, it makes sense in begin … end language. A construct like this:
if condition begin
return;
end if;
would be significantly shorter and probably more readable if written as:
No, it doesn't. The standard way is exactly the same length, so no such shorthand would be justified probably. Consider the usual syntax:
vs. a hypothetical:
A possible reason for introducting such a 'reverse' syntax would be that the primary intent were expressed first. Because of left-to-right reading, then it would be easier to understand, leading to more readable code.
From a language design perspective, it would make sense using a different keyword such as
whenin order to prevent confusing bugs. Consider the following two lines of code:should probably have been written as:
From a character-saving perspective, it makes sense in
begin … endlanguage. A construct like this:would be significantly shorter and probably more readable if written as: