If you're writing code that is fundamentally based on mathematical principles and models, even if you aren't personally using mathematics every day, its going to feel a lot better in Julia. That is: Julia looks a lot more like mathematics than Python.
__
Longer version:
Obviously some people are mostly writing websites or GUIs or whatever in Python and won't see the beauty in this.
But if the problems you are working on have, at their base, a mathematical foundation (even if you don't actively practice the math), it's much more beautiful IMO. So, simulation, data analysis/science and machine learning, statistics, etc...
Once you get used to using it for that though you'll realize it's actually quite nice for a lot of other things as well and the "mathematical mindset" it somewhat pushes results in cleaner solutions for other problems too. Just in general the syntax and patterns are nice.
Here are some quick things using randomness in Julia that would be a bit slower and more verbose in Python:
Generate a random number:
> rand()
Pick a random message:
> rand(["First message", "Hello", "Foo"])
Generate a random 3x3 matrix of booleans
> rand(Bool, (3,3))
Define a function and run it elementwise on a random matrix of bools:
> myprint(x)= x > 0 ? "Happy" : "Sad"
> B=and(Bool, (3,3))
> myprint.(B)
Returns:
> 3×3 Matrix{String}:
> "Happy" "Happy" "Sad"
> "Sad" "Happy" "Happy"
> "Sad" "Happy" "Happy"
And many many more nice features...but the Julia design meaning functions like rand() just apply how you expect regardless of the input type are quite nice. rand(list of stirngs) *should* give me a random string and rand(range of numbers) *should* give me a random number in that range! No one would write an academic paper and define a new rand function for each input because well...it's clear what the user wants - rand of something.
If you're writing code that is fundamentally based on mathematical principles and models, even if you aren't personally using mathematics every day, its going to feel a lot better in Julia. That is: Julia looks a lot more like mathematics than Python.
__
Longer version:
Obviously some people are mostly writing websites or GUIs or whatever in Python and won't see the beauty in this.
But if the problems you are working on have, at their base, a mathematical foundation (even if you don't actively practice the math), it's much more beautiful IMO. So, simulation, data analysis/science and machine learning, statistics, etc...
Once you get used to using it for that though you'll realize it's actually quite nice for a lot of other things as well and the "mathematical mindset" it somewhat pushes results in cleaner solutions for other problems too. Just in general the syntax and patterns are nice.
Here are some quick things using randomness in Julia that would be a bit slower and more verbose in Python:
Generate a random number:
> rand()
Pick a random message:
> rand(["First message", "Hello", "Foo"])
Generate a random 3x3 matrix of booleans
> rand(Bool, (3,3))
Define a function and run it elementwise on a random matrix of bools:
> myprint(x)= x > 0 ? "Happy" : "Sad"
> B=and(Bool, (3,3))
> myprint.(B)
Returns:
> 3×3 Matrix{String}:
> "Happy" "Happy" "Sad"
> "Sad" "Happy" "Happy"
> "Sad" "Happy" "Happy"
And many many more nice features...but the Julia design meaning functions like rand() just apply how you expect regardless of the input type are quite nice. rand(list of stirngs) *should* give me a random string and rand(range of numbers) *should* give me a random number in that range! No one would write an academic paper and define a new rand function for each input because well...it's clear what the user wants - rand of something.