juxtaposition has higher precedence than /, 2π/3im is (2 * π) / (3 * im), not (2 * π / 3) * im. My perhaps controversial suggestion is to avoid it if you don’t want surprises, as cute as it is.
That is exactly the reason why I never do 2x. Yes, I know it looks neat and there are many topics discussing this and I know that the core julia devs like/love this feature and defend it, but I make enough confusion in my code on my own, don’t need help from outside
Would it be a good idea to make the precendence of implicit multiplication lower than most explicit operators? That should be more intuitive. E.g. 1/2e would be 1/(2e) instead of (1/2)e? I’m not sure of the implementation difficulty though.
As others have mentioned, it’s debatable whether the current behavior of juxtaposition was a good choice or not. But even if most people were to agree that a different behavior would be better, it would break a lot of existing code. So realistically, it’s not going to be changed.
Realisticly yes, that’s very true. I still have some hope that maybe a certain major version would allow breaking changes, somehow still supporting old code, although chances are extremely slim. Even that post is from 6 years ago… It’s a bit sad.