So over the last few days i’ve been looking at the output that was being generated by my first attempt at writing an As3tohaxe translator. The results have been inconsistent to say the least. Not inconsistent in terms of different results everytime i ran it, but inconsistent within a file itself. Some variable definitions would get updated, while others would not. Some for loops would be translated, and others wouldn’t. Now normally it would be easy to step though the code and see why this is happening, but in haXe and neko there is no debugger. The only thing you can do is litter your code with println’s all over the place, which isn’t really all that helpful.
I thought it would be cool to write the program in the target language of its output, but given this rather significant shortcoming to the development environment, something more robust and mature is needed. Enter Java and Scala. Combined with IntelliJ (my favorite Java IDE) I’ve begun re-writting the program with the help of the built-in debugger. I thought it would be interesting to take this opportunity to learn Scala at the same time, but that is proving to be a bit challenging as Scala’s syntax flirts with both OO and Functional paradigms, it’s proving a bit difficult to wrap my head around. So for the time being the code is a mix of Scala and Java while i learn more about Scala and how to apply its strengths to this project. As Steve McConnell would say, you have to program into your language, not in it. What he means is using the features of the language you are writting in to make accomplishing your goals easier. Instead of applying the same algorithms and methodologies with just different syntax.
So with this new approach in mind i am now in the process of re-designing the program and will hopefully have some better results to report in a few days.

Categories
Tag Cloud
Blog RSS
Comments RSS

Void « Default
Life
Earth
Wind
Water
Fire
Light 