Category:Phix: Difference between revisions

m
Use monospaced font for inline code.
No edit summary
m (Use monospaced font for inline code.)
Line 16:
A single 6MB download contains a precompiled executable, all the sources, and'' '''everything''' ''needed to recompile them, in about 15 seconds. The download also contains a full-featured programmer's editor and 130 demo programs.
 
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>. 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.
 
sequences (the one type covers lists/queues/tables/trees/arrays etc) and strings can grow and shrink automatically without any memory management overhead. For example if <tt>s="food"</tt> then <tt>s[2..3]="e"</tt> makes <tt>s</tt> "fed", and then <tt>s[2..1]="east"</tt> makes <tt>s</tt> "feasted".
 
==See also==
Anonymous user