Hi Friedrich, I'm glad you like Julia. I'll respond briefly to your suggestions; for some of them, I think they've been suggested before on this mailing list with more detailed answers than I've written here.
Minor syntax changes between languages can be annoying, but if you use Julia more, you will probably come to find them less irritating. Most of the small syntax changes are unlikely to happen (elif,len,:); changing would create a lot of pain for existing code with little benefit. There's a github issue where you can follow the discussion of adding a switch statement: https://github.com/JuliaLang/julia/issues/5410 `if 5:` doesn't work because 5 is not a boolean value; it is by design that Julia makes a distinction between boolean values and integers/etc. Julia has an enumerate function: ~~~ *julia> **help(enumerate)* Loading help data... Base.enumerate(iter) Return an iterator that yields "(i, x)" where "i" is an index starting at 1, and "x" is the "ith" value from the given iterator. ~~~ The `.` in `.<` makes it clear that the operation is element-wise; this is especially important in `.*`, for example. What does divmod in python do? It's possible that there is a Julia equivalent under a different name. Best, Leah On Thu, Apr 3, 2014 at 5:45 PM, <[email protected]> wrote: > Hi Julia users, > > Maybe you want to support me with my wish list. > Here it is: > > - end statement: remove it (ala python) and use indentation, the code will > be shorter and cleaner > > - case/switch: include it (missing in python) > > - array indexing: introduce with negative number -1,-2,... (instead of or > additionally to end, end-1) > e.g.: a[-3:-1] vs a[end-2:end] > (again shorter and cleaner). Note -1 could index the last element (not > previous last element as in python) > This would be inline with the Julia one-based indexing. (Maybe an idea > is to use braces for zero based indexing, e.g. a{0}=3.14) > > - dictionary: mydict = ["one": 1, "two": 2, "three": 3] > (i.e. colons ala pythons instead of ["one"=> 1, "two"=> 2, "three"=> 3], > shorter and cleaner) > well, it is ambiguous: [1:3] > > - provide a divmod function ala python > > - if 5: should work (ala python and c, and not the redundant "if 5>0") > > - provide an enum function (enumerate ala python) > > > - [1 2 3] .< 2 remove the dot in those scalar operations > > - elseif => elif > > - length => len > > > Ok. That's it for now. > Julia devs, you did a great job! There are many things that I like more than > in python. > > Cheers > Friedrich > > > > >
