Julia question
by rnturn from LinuxQuestions.org on (#590DE)
I recently started looking at Julia. As I slogged through the HTML file that's included in the julia-doc package, there's mention of two ways to perform integer division (you know, "9/4 = 2"): "div(9, 4)" and "9 :^h- 4" or ":^h-(9, 4)" (where ":^h-" is my way of representing the division sign we learned in grade school). (See `integer divide' in the attached table from the Julia docs.)
Since keyboards don't provide that symbol any more, and the only way to obtain it in the julia(1) tool is the tab completion of "\div" (i.e. "9 \div<tab> 4") is there a good reason for even providing a means of using non-keyboard characters in Julia programs? I mean other than, perhaps, making APL programmers more comfortable? I can see they could allow one to write code that actually appears like real mathematical equations -- there are a ton of these tab-completed symbols one can specify -- but can that actually be practical? Or have I gotten so used to using things like "floor(9 / 4)" (or similar) that my mind is just a little boggled by this?
Any Julia folks out there who can provide some insight?
Cheers...
Attached Thumbnails


Since keyboards don't provide that symbol any more, and the only way to obtain it in the julia(1) tool is the tab completion of "\div" (i.e. "9 \div<tab> 4") is there a good reason for even providing a means of using non-keyboard characters in Julia programs? I mean other than, perhaps, making APL programmers more comfortable? I can see they could allow one to write code that actually appears like real mathematical equations -- there are a ton of these tab-completed symbols one can specify -- but can that actually be practical? Or have I gotten so used to using things like "floor(9 / 4)" (or similar) that my mind is just a little boggled by this?
Any Julia folks out there who can provide some insight?
Cheers...
Attached Thumbnails