Why Haxe over C/C++ (or any other language on the TIOBE index suitable for game dev, like lets say Java)? #2193
Replies: 1 comment 1 reply
-
Hello. This is not suposed to be an answer for your questions (i don't even have the understanding for that), but i will share my experience with Haxe. I personally think Haxe syntax is very similar to C#, which i consider easier than Python because its "clear" design. My first experience was about ~a year ago and it was my first language (yet unique, because i only touched C# later) and was so good... I know the basics of Haxe but i feel it is sufficient (or almost) to create a full game without problems. Haxe manual is excellent and objective, you will not feel lost there (C# tutorials sometimes was useful for me to use in Haxe). The final code is very readable that i don't need to too much comments (i avoid the need of comments by trying to write clean code). If you don't know a reason for learning Haxe, i give one to you: Armory. It is currently the best way to script in this engine and a great first language if you don't know any. Also you will have the benefit of having example codes from nodes to copy/translate into scripts. I heavily recommend Haxe. If you have some free time, give it a try. Consider you will be approaching to C# while learning Haxe (i say it by my own experience) but i don't had time to explore C# more to say too much, except regarding arrays (needs to specify its size) and small differences in the syntax. Another reason would be because you can output other languages using Haxe. I personally don't consider this for my use, because i don't work with programming. Keep in mind this is just a newbie point of view, but all i said is truth. |
Beta Was this translation helpful? Give feedback.
-
I mean so far Ive been loving pretty much everything about this engine. My main concern is actually having to familiarize myself with Haxe. It seems like a relatively complex languaege by its syntax (maybe not very compared to C++ but still) and yet not that widely used (I never even heard about it until stumbling over this project). What advantages does it have over lets say C (ofc it transpiles to other languages, but how does that merit this project if you are just targeting JS and C binaries anyway (considering that Emscriptem exists)?)?
So, why choose Haxe over more common languages like C or C++ (or even Java or Rust)? Generally speaking I wouldnt mind learning a new language if its relatively common and I feel it something that I will likely merit from in any future project outside of Armory that I might take on, but with Haxe it feels like I might never stumble over any project using it.
And I wonder if others that like me never heard about Haxe before wouldnt feel the same?
Does Haxe have some obvious advantages that improves developer productivity, making it more ideal over traditional languages that would suite game development like Java or C?
Another concern I have is the ability of using third party libraries, Ive seen that Haxe supports calling C++ code (but I believe the target platform would then also be restrictued to C++ resulting in that you would need "duplicate" code if you want to target both web and other platforms when using external libraries (as you would need both a JS and a C version)?), but then theres a need for "glue code" and manually setting what the equallent types used would be in Haxe (making it less ideal for importing entire libraries). What if I find some cool lets say UI library that I wanna use written in Java, Python or C? Now here you might argue that Haxe also has libraries for it, but that would likely be a lot less compared to what you would find for C/C++/Java/Python (or any other language making it on the TIOBE index).
I guess "are we going to see support for other programming languages?" might be another question related to this post. If Kha supports C/C++, it would be nice if we could as well (does it exposive C bindings in the first place? I noticed theres a lot of C code in the project tho Im guessing thats just to communicate with the target renderers like Vulkan & DirectX). So if there are plans on expanding for more languages please do mention it 🙂
Thanks for reading <3
Beta Was this translation helpful? Give feedback.
All reactions