red42 / HTML5_Genetic_Cars

A genetic algorithm car evolver in HTML5 canvas.
zlib License
1.19k stars 294 forks source link

Would you be willing to switch to TypeScript? #29

Closed electricessence closed 7 years ago

electricessence commented 7 years ago

I noticed an issue for moving to modules. Why not make a bigger leap that includes modules? I'd be willing to help, if not just make the conversion for you. :)

I'm asking first because it would be a waste to convert if it's not wanted.

red42 commented 7 years ago

I don't really have an opinion about TS. While I enjoy the order it brings to code, I also think it adds a layer of understanding not everyone (mainly new coders) is willing to face.

Maybe create a TS branch and we can pull it to master if it proves popular?

electricessence commented 7 years ago

Sure, but as you can imagine, as soon as you move to TS, then you really can't intermix after that. But I will look into it.

electricessence commented 7 years ago

I will do a quick run through today to see how much effort it will be to migrate.

electricessence commented 7 years ago

Well the good news is, you can easily switch to modules and you'll get typings for both box2d and seedrandom. Which is nice. Bad news is, there is a lot of work that needs to be done within the code itself to follow a modular standard. I really like that your project runs out of the box. You can download it and simply execute the html with no environment or compile step. I would want to stay as close to that as possible.

I think phase 1 is to provide a UMD module export for box2d and seedrandom so you can import them without browserify or some other packager.