&
is always evaluated in a string context, while +
may not concatenate if one of the operands is no string:
"1" + "2" => "12"
"1" + 2 => 3
1 + "2" => 3
"a" + 2 => type mismatch
This is simply a subtle source of potential bugs and therefore should be avoided. &
always means "string concatenation", even if its arguments are non-strings:
"1" & "2" => "12"
"1" & 2 => "12"
1 & "2" => "12"
1 & 2 => "12"
"a" & 2 => "a2"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…