How to modify HDF5 dataset

I noticed in HDF5.jl that setindex! is defined, and so I tried

function update_dataset4(src, dest, dataset)
    cp(src, dest, follow_symlinks=true, force=true)
    f = h5open(dest, "r+")
    d = f[dataset]
    newd = zeros(eltype(d), size(d)...)
    d[:,:] = newd
end

and it does what I want.

So now I’m just wondering what’s the difference between x[:] = y and x .= y. I think the first calls setindex! while the other calls copyto!, but I don’t really understand why these are distinct methods.

Edit: Also, is there a shorthand for “all indices of all dimensions” like the ... in numpy?