From the script (emphasis added):
Nervously, he looks around at the foreboding jungle.
LUKE: Still...there's something familiar about this place. I feel like...I don't know...
STRANGE VOICE: Feel like what?
Luke jumps out of his skin. Artoo screeches in terror. The young warrior grabs for his lightsaber as he spins around, looking for the speaker. Mysteriously standing right in front of Luke is a strange, bluish creature, not more than two feet tall. The wizened little thing is dressed in rags. It motions toward Luke's sword.
LUKE: (looking at the creature) Like we're being watched!
CREATURE: Away with your weapon! I mean you no harm.
After some hesitation, Luke puts away his weapon, although he really doesn't understand why. Artoo watches with interest.
By the time Yoda reveals himself, Luke is clearly on edge. From the jungle simply being creepy to almost witnessing R2 get eaten by the swamp monster, his survival instincts must have been through the roof. When Yoda spooked him, there was, more than likely, a high chance Luke would have attacked out of sheer reflex.
At this point in the movies, we're not sure of Yoda's health or power, but when he lifts the X-Wing, it requires much more time (and possibly focus) to get it done when compared to his shows of strength from Ep. III, even after Luke warmed it up for him.
Is there any reference or evidence that states, if Luke had followed through with his attack, that Yoda wouldn't have been able to react in time and've been killed?