Hi,

Before closing (this thread?), I would like to write one more thing. First, 
because I am not a native English speaker, it doesn't
actually matter how 1:n etc "reads" (simply because I don't pronounce them 
in mind :) Second, when I started
learning Julia half a year ago (sorry for a slow starter...), I also felt 
awkward that I have two kinds of syntax for the same
thing. So I tried to use "in" only for the time being (to mimic Python). 
But after a while I got back to "=", because it is gives  more concise (and 
IMO more readable) expressions, particularly in array comprehension. For 
example,

a = [ f(i,j,k) for i=1:p, j=1:q, k=1:r ]

a = [ f(i,j,k) for i in 1:p, j in 1:q, k in 1:r ]

# In this sense \in (greek letter) is as concise as =, but typing in the 
greek character takes a bit more time... (though I may be
able to customize Emacs if necessary).

As for Python-like, "there should be only one syntax for one purpose 
(semantic?)" policy (sorry if my English is strange), there seem to be many 
counter examples in Julia. For example, vcat() and [ a; b ] seem 
essentially the same, while the latter is probably there for brevity. I 
think it is not bad to have a shorter way to write it unless there are 
serious problems.

Btw, apart from the = vs in stuff, I really like this language because it 
allows multiple for-loops to be written concisely as

for i = 1:p,
     j = 1:q,
     k = 1:r
     (do something)
end

Indeed, I used to use a macro like this in C++ before that allows to write

For( i, 1, p,
       j, 1, p,
       k, 1, r ) {
     (do something)
}

so Julia has become one of my most favorite languages :)
Sorry for a long post...

Reply via email to