wagenaartje / neataptic

:rocket: Blazing fast neuro-evolution & backpropagation for the browser and Node.js
https://wagenaartje.github.io/neataptic/
Other
1.19k stars 279 forks source link

Refactor with typescript #74

Open krooq opened 7 years ago

krooq commented 7 years ago

Typescript is fantastic for managing the increasing the complexity of a project which I would argue is borderline with Neataptics current implementation. Synaptic uses it and already has declaration file @types/synaptic, so modifying such a file to work with Neataptic shouldn't be to difficult. I'm no expert on typescript so it'll be a while before I know enough to attempt an implementation.

wagenaartje commented 7 years ago

I'm also no expert on TypeScript :(. I did some quick browsing and it seems quite useful for projects like this. The only thing i'm kind of afraid of is that it compiles to regular JavaScript. This means that current code might be changed to be less efficient. But if someone could explain why TypeScript is better than plain JavaScript in some simple words in this thread, it would be great :)

AlexisTM commented 7 years ago

Speed comparison: http://incaseofstairs.com/six-speed/

aaronshaf commented 7 years ago

Another good option is Flow: https://flow.org/

krooq commented 7 years ago

Typescript adds a layer of compile level type checking. This means as @AlexisTM said, less bugs, it also gives you other improvements to scale-ability e.g. refactoring capabilities.

AlexisTM commented 7 years ago

What is the difference between Typescript and Flow?

https://jan.varwig.org/2017/02/15/flow-vs-typescript.html

https://github.com/niieani/typescript-vs-flowtype

talvasconcelos commented 6 years ago

I'm a plain JS fan too.

ali-habibzadeh commented 6 years ago

+1 for adding .d.ts to this framework. We need types! :)