Choosing a simpler print than println ? :)

I’ve read materials liked some and some are liking. :slight_smile: . 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. :slight_smile:

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
julia> print(x)
julia> println(x)


:slight_smile: oh sorry. I found print. cool :slight_smile: Solved.
I hope in future, Julia be concern about making things more natural language ways :slight_smile:

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.


:slight_smile: yes your are right. I personally like print because sound more natural to write and talk as Python background.
I personally think :slight_smile: 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. :slight_smile:

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.