I’ve read materials liked some and some are liking. . Found easy things , even easy to write a function and a unicode.
But All the way through those cool use why julia choose println
(print is more natural than println ).
I am thinking why Julia choose println
instead of print
because print
is easier to talk and read.
I’m of two minds here. 80% of the time, you want println
behavior, but then sometimes you don’t want a newline at the end. The python approach is to use a keyword argument, which isn’t the worst, but I think julia’s answer of having both print
and println
is probably conceptually clearer.
Julia has both print
and println
. println
adds newline at the end.
julia> x = 5
5
julia> print(x)
5
julia> println(x)
5
oh sorry. I found print. cool Solved.
I hope in future, Julia be concern about making things more natural language ways
Probably the final syntax choice is because other languages, like java
and C
have also println
. I would also have chosen to keep print
for the most common (I think) case that println
is, but others might prefer otherwise.
yes your are right. I personally like print
because sound more natural to write and talk as Python
background.
I personally think the way of writing of python (more natural) and more easier learning curve, that part should be import to julia (yes i got to know, julia have even more cool features) but anyway, but i feel fear if borrowed from c or java (steeper learning curve) syntaxes.
As a non-former-python regular user I find the Julia syntax much easier (with the only exception of that and the and
vs. &&
). Otherwise, the syntax for functions, structures, math in general, loop ranges, an many other, is cleaner in Julia. But we always find that what we are used to is simpler. That is normal.