Category:Phix: Difference between revisions

m
no edit summary
mNo edit summary
Line 28:
Phix applies the principle of least surprise, for instance in some languages <tt>myproc(list)</tt> or <tt>res = myfunc(list)</tt> can mangle list, whereas in Phix if you actually want that to happen you would code <tt>list = myproc(list)</tt> (and myproc would need to become a function) or <tt>{res,list} = myfunc(list)</tt>. Likewise 1/2 is 0.5 (not 0, unless you explicitly ask for the floor()) and 0-1 is -1 (not +MAXINT). A core tenet is that for any line of code there is one and only one possible interpretation of it, and said meaning is utterly intuitive.
 
The principle goal of Phix is to make debugging easier, a whole subject area that does not seem to get the attention it deserves. Not entirely sure I am succeeding, yet.
My goal on rosettacode is to show that Phix is easy to understand (succinct but not terse), and easy to debug.
 
==See also==
7,818

edits