Re: Phix language
- Posted by petelomax Nov 20, 2011
- 4223 views
Phix started before RDS went open source, so it is a complete rewrite.
It is an alternative implementation, with some advantages and some disadvantages.
I have no problem with OE stalwarts completely ignoring Phix or anyone flitting between the two.
I think this list includes all the major differences:
- Native 8-bit strings
- Named parameters, eg message_box(title:="title", text:="text", style:=MB_OK) works the same as message_box("text","title",MB_OK)
- No implicit sequence ops
- include file handling is a bit more intuitive, has relative directory handling, and it also does automatic includes, eg if you forget to include msgbox.e before using it, it will find it for you.
- Direct comparison (eg if name="pete" then)
- Negative indexes (as well as $)
- Variable length slice assignment (eg s="food" s[2..3]="e"; s is now "fed")
- Short circuit evaluation of all expressions (4.0 may now be the same?)
- Automatic pass by reference optimisations (for an example see bench.exw)
- inline assembly (x86)
- Additional compile-time type checking
- Automatic internal memory leak checking
- Self-hosted, no need for Watcon/Borland/gcc.
- No DOS or Linux versions.
- No floating point for loops
- Currently only one developer on Phix compared to quite a few on OpenEu. Overall I'd say it was pretty stable and perfectly usable but there is plenty left to do, including finding that special "magic" that gives it a real edge.
- There are plenty of things in 4.0 that have not made it into Phix.
- There is no intent to make all 4.0 programs run "out of the box" on Phix but modifying them to work should be straightforward.
- Many new bugs!
Right now I'm working on extensive low-level changes for native thread support, which took a murderous time to get started but are currently fair zipping along.
Regards,
Pete