4 ms·
You can use the @. macro to dot an entire block. I personally like the dot syntax. It's ergonomic, and provides cool stuff like this: https://julialang.org/blo
by dklend122 6y ago
You can use the @. macro to dot an entire block.
I personally like the dot syntax. It's ergonomic, and provides cool stuff like this: https://julialang.org/blog/2017/01/moredots/ https://julialang.org/blog/2017/01/moredots/
I don't know of an equivalent functionality in any other language.
- cycomanic 6y agoThe @. syntax is definetly an improvement. I don't have an issue with the principle of the dot syntax just with the symbol. The examples in your link perfectly illustrate the issue. If this was a line in a long code base maybe even with mixed element-wise and matrix operations it would be very easy to overlook a missing dot. It would be even worse if the constants were floats. It is just such a terrible choice of symbol for this operation, because it is so easy to overlook. Everyone I know always looks for missing dots if they encounter a some nonstraight forward bug in matlab (I don't know any Julia users).