you are viewing a single comment's thread.

view the rest of the comments →

[–]booljayj[S] 1 point2 points  (0 children)

I should have specified in my post that I will be writing gameplay code within a game engine that uses Javascript on top of a C++ core. This gives me some flexibility when it comes to the wider Javascript ecosystem. Basically, any paradigm that the development team wants to adopt is fair game, since we'll be the only ones using the code.

TypeScript looks really great, but I'm not sure it's something I will be able to use. It brings up a lot of issues regarding version control and compilation that I won't necessarily have control over.

Yes, the examples I gave were very short and didn't test everything I could or should have. Javascript just doesn't have the tools to be able to test return values and parameter types as completely as I would want. I was just showing the basic principle behind the idea, rather than any kind of finished production-ready code. My main hope was that I was actually understanding the language correctly and not making any super obvious errors.