trizZzle How would you handle this scenario without await?
I haven't got a clue 😃
What I wrote was supposed to be taken in the context of this thread, not as a general claim. I already explained several times in the past why beginners should completely stay away from await. Some other people have done it as well. I don't have time to type the same thing over and over. Moreover, explaining coroutines to a beginner who haven't even yet learned how _process() works - is pointless. It will just go over their head and possibly confuse them some more. So I just give them a blunt reduced version 🙂. If someone is really interested in finer points, they can always ask.
So yeah; if you're a beginner and you're not fully familiar with the concept of coroutine, never ever use await. Conversely, if you know what you're doing, go ahead and blast yourself with awaits all day long. More power to you.
As for your example; it looks a bit contrived. Firstly, which real life situation would require a call order like this, and secondly some_child_node will be null anyway because you haven't initialized it.
The "proper" way to do it would be to respect the order of node initialization and put the dependent code into a place that runs after its dependency has been initialized. If something needs to run after the node is ready - put it in that node's _ready(), not in some other node's _ready(). The latter will just needlessly spaghettify the execution. As if that isn't bad enough, you then try to remedy it by turning this _ready() into a suspended coroutine, which spaghettifies the execution even more, not only in space but in time as well. Double whammy.
Instead, just arrange your code so it respects the order of initialization. The solution for your example is hence trivial:
# Node A
@onready var some_child_node = $Child
func _ready():
some_child_node.do_something()
# Node B
func _ready():
pass