What is the difference between the two code snippets?

In reply to Verif Engg:

They there is no functional difference in the last two examples you wrote. But that is not the same as

forever 
        @posedge(clk) ; // adding semicolon here is not the same 
        if(vif.sof == 1) begin
           //some code here
        end