Is there B+ to Max Converter?BlitzPlus Forums/BlitzPlus Programming/Is there B+ to Max Converter?
| I've just successfully ported B+ code to Max|
It was a lot of repetition to get it converted, but not too complicated, but My programing isnt probably complex structure and so-on, but I would love a B+ to Max & a Max to B+ converter? is there one out there?
Last edited 1+ years ago
| A *perfect* B+ to BM converter is possible since BM can do things B+ can't and BM can do everything B+ can, but the inverse is not true. BMax is (basic) OOP, while Blitz is still procedural. |
| A B+ to BMax converter has to solve three main problems:|
-- namespace collision: BlitzMax only has the one namespace for functions, types and variables
-- scoping differences: Max has some (slightly inconsistent) different scoping rules from B+, and variable declarations may need to be moved to get the same behaviour (this is likely to be an edge case... just don't declare variables in the middle of your code)
-- keyword collision: any variables named "Abstract", "Method", "Private" etc. will collide with new keywords introduced by the OOP extensions
At the end of the day these aren't a big deal, and a converter could probably get away with ignoring them, or issuing a warning.
A BMax to B+ converter would effectively have to be a full compiler, because BlitzPlus doesn't have enough features to replicate BlitzMax's behaviour without a lot of helper code to simulate function pointers and so on, and the end result would be very slow by comparison.
| You mean like when you go File->Import BB Project in BlitzMax? |