> `=` better than `in`: `a = [ f(i,j,k) for i=1:p, j=1:q, k=1:r ]` Please note that I am not trying to claim "=" is better universally (i.e. for everyone) based on this example, because some people prefer more English like syntax for clarity of meaning (even when a bit longer).
So anyway, it would be nice if the official document will be updated to emphasize that there is no distinction between in and = (used with for-loops, as of v0.4), and that if one prefers, one could use "in" everywhere (this is a great point). Then we can just cite that explanation when a question arises for a while :) On Thursday, October 29, 2015 at 10:41:19 PM UTC+9, Tom Breloff wrote: > > Agreed with Tony. Having lots of ways to do the same thing is fine, as > long as we had no other syntactical use for the `=`. Anyone want to > support notation like: `for y = sin(_) in 1:10 ... end`? Probably not, so > no big deal to keep both around. > > Also I just saw Tk's post with this great example of `=` better than `in`: > `a = [ f(i,j,k) for i=1:p, j=1:q, k=1:r ]` > > On Thu, Oct 29, 2015 at 9:10 AM, Tony Kelman <to...@kelman.net > <javascript:>> wrote: > >> How is having multiple syntaxes for something automatically bad? I don't >> hear people complaining that for loops are redundant when you could just do >> while with a counter, or that enumerate is equivalent. Having style >> guidelines for base to say when one choice makes more sense than another is >> fine, but this thread's overblown. > > >