Multiline inline functions run order seems counter intuitive #253
Magnetuz
started this conversation in
Language Development
Replies: 1 comment 2 replies
-
I am aware of this behavior. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
According to the documentation, the multiline inline functions runs top-to-bottom. At a first glance it seems fine, as it is the usual form to read the code. However, if one just add a line break on its single inline function, it will modify the way the function works and break it.
In another words, adding line breaks to improve readability will break the inline function. I have never seen such a behaviour and sounds very counter intuitive.
This can be verified on the tutorial example here.
Expected behaviour
Adding line breaks to an inline function does not change the way it works.
Current behaviour
Adding line breaks to an inline function changes the way it works and breaks it, requiring reworking it. More line breaks, more rework.
Beta Was this translation helpful? Give feedback.
All reactions