I can see how that would be useful, but no–it’s not a supported syntax in Julia. It is the kind of thing that could probably be implemented in a macro (kind of like how GitHub - mcabbott/Tullio.jl: ⅀ implements Einstein summation), but I don’t know of an existing implementation.
I think the primary thing to take away here is not the particular trick of how to use hcat most efficiently. The most important thing is what @jlchan said at the very beginning:
It’s hard to overstate how important this is. Your initial post included a loop which was easy to write and easy to understand, and simple loops like that are often the fastest way to do things in Julia. If you can describe what you want in a loop, then you can often just declare victory and move on to the next problem.
By the way, if you do want to improve performance a bit, you might try transposing the way you store your matrix. Julia matrices are column-major (this is like fortran and Matlab and unlike numpy and C), so it’s usually better to store data that are accessed together as columns instead of rows. That would mean making GRID into a 3xn matrix instead of nx3 and accessing it as GRID[:, i].