There are two separate issues here, which you are confusing.
Does function call via @ ignore HoldFirst attribute?
No, it doesn't.
f@x are different textual representations of the very same expression. Writing it either way has absolutely no effect on evaluation. The parser converts both into the very same internal representation. The evaluator works with this internal representation and doesn't know how you wrote the code originally, as
I was trying to test whether using
func[x,y] is the same as
This is an entirely different question, and has nothing to do with using the
@ character. It's about using a pure function. Note that
func[#,y]&[x] are exactly the same thing. The latter has no
@ in it.
By default, any pure function behaves as if it had no attributes (such as
HoldAll, etc.). Demo:
Hold[#] &[1 + 1]
(* Hold *)
Let's write this using its FullForm:
Function[Hold[#]][1 + 1]
If you look up
Function, you will see that we can construct a funtcion with the same behaviour using the following syntaxes too:
If we write it this way, we get access to the third argument, where we can specify attributes. See the
Function documentation page for more information.
Function[x, Hold[x], HoldAll][1 + 1]
(* Hold[1 + 1] *)