KryptonChicken / soundzcape

2D platformer with procedural generated wave platforms
Apache License 2.0
4 stars 3 forks source link

Should we use static type checker for Python/JS? #9

Open tommyip opened 7 years ago

tommyip commented 7 years ago

Python: Mypy JS: Flow

I don't mind writing bear Python since we don't have much logic for MVP, but might be beneficial when we get into multiplayer.

For Javascript, having flow would definitely be a good idea.

Thoughts?

Arthelon commented 7 years ago

I'd recommend trying out TypeScript over Flow. Will drastically alter project structure/tooling though. (i.e. tslint instead of eslint)

tommyip commented 7 years ago

@Arthelon I don't have any experience with either of them, can you elaborate on how would Typescript change our project structure?

Arthelon commented 7 years ago

@tommyip If you choose to abide by certain typescript design practices (i.e. flyweights) it could change the way your code is structured since the features provided by typescript allow for a lot more higher order patterns. In addition, you also might need to find room for some of the tooling (ex: type definition files).

tommyip commented 7 years ago

After looking at the docs for both tools, I am favoring towards Flow. The thing about type checker is that it doesn't really help catching bugs (we could be much better with solid unit/integration test), but it allows code editors to provide better auto-completion and other features. If all we need is a type checker, I think Flow would be a better option since it stays out of the way during development.

Other opinions?

anshuman73 commented 7 years ago

IMO, we don't really need static types. AFAIK, they're only useful in increasing some processing performance, which is not highly required for our project. Only increases complexity and makes the code non beginner friendly

tommyip commented 7 years ago

Okay so we decided to not add static typing to our Sanic/Python backend right now.