You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 16, 2018. It is now read-only.
The guide sets the following guidelines for single-expression functions:
Expression functions should not wrap to two lines. If an expression function grows to require wrapping, use a normal function body, a return declaration, and normal expression wrapping rules instead.
It should be understood that it prohibits the use of this kind of constructs:
It's easy to misread the style guide and get the impression that expression functions are only valid if they occupy exactly one line. It would be great to have a more clear description of the wrapping rules in this case.
The text was updated successfully, but these errors were encountered:
The guide sets the following guidelines for single-expression functions:
It should be understood that it prohibits the use of this kind of constructs:
Instead, the following form should be used:
However, the following expression function, although multiline, doesn't contain wrapping, as it returns a single multiline expression:
It's easy to misread the style guide and get the impression that expression functions are only valid if they occupy exactly one line. It would be great to have a more clear description of the wrapping rules in this case.
The text was updated successfully, but these errors were encountered: