One thing no-one has mentioned yet is who is writing the code: I’m assuming your background is a web developer/software engineer? Most deep learning users I’ve encountered are ex-scientists. This strongly discounts your benefits. First, many of them only know one language (most likely one of Python, R or Matlab, but there’s a smattering of others which are used). Learning a new language is hard for these ex-scientists (remember, someone doing a CS degree will have likely seen 5+ languages), especially one like JavaScript: rapidly changing, libraries have breaking changes, and a whole new set of tools/processes to learn (e.g. minification or tree-shaking).
Second, while the JS community is huge, the vast majority is working on front-end web development, or adjacent fields. In many cases, systems like Anaconda provide a one-click install of all the libraries they need—JS on the other hand has no equivalent tool, and the libraries simply do not exist that they need (or are unmaintained—the reader library for the standard astronomy format (FITS) hasn’t been touched in years, and it doesn’t even support the full standard, whereas Python’s equivalent has massive community support and can both read and write FITS).
Third, these ex-scientists are going to write imperative code (for better or worse). Types are an extra thing to think about, and their eyes are going to gloss over if you try to explain the benefit of well designed type systems.
Forth, “write code once, run anywhere” does not exist for deep learning: look at the number of GPU clusters that have been built using NVidia GPUs (rather than AMD or a different chipset). Deep learning is highly tied to hardware, and especially on mobile, you are forced into a specific framework per device in order to get reasonable performance (which in some cases can be critical if a certain application is to succeed). In many cases, using JS would only add to the languages needed, rather than reduce them.
It’s possible that JS may at some point in the future evolve in such a way that it becomes a natural choice for deep learning, but it’s worth keeping the following things in mind:
There’s a general estimate that it takes at least 10 years for a (scientific/numerical) ecosystem to mature: Python’s is 20+ year old (numpy’s predecessors originate in the 90s). Maybe if we wait 10 years the issues with JS will have gone away (stability, diversity of libraries, easy-to-use distributions).
Few languages have broad usage across the different areas of numerical computing, instead they get pigeon-holed into a specific domain, or are domain-specific (see R for stats or STAN for Bayesian analysis)—Python itself still loses to R for stats (and note the use of r2py and Julia’s ability to call Python—languages are added, not removed).
Neither the language nor the tooling of JS especially support numerical computing: you need things Python’s slicing or tools like Cython to make it worth using (R and Matlab have similar language or tooling support). It’s possible JS will add these, but that would be a major change to the language (and you’ve got the lag time for such features to roll out, ex-scientists aren’t the type of people who continuously upgrade their environment).
One thing no-one has mentioned yet is who is writing the code: I’m assuming your background is a web developer/software engineer? Most deep learning users I’ve encountered are ex-scientists. This strongly discounts your benefits. First, many of them only know one language (most likely one of Python, R or Matlab, but there’s a smattering of others which are used). Learning a new language is hard for these ex-scientists (remember, someone doing a CS degree will have likely seen 5+ languages), especially one like JavaScript: rapidly changing, libraries have breaking changes, and a whole new set of tools/processes to learn (e.g. minification or tree-shaking).
Second, while the JS community is huge, the vast majority is working on front-end web development, or adjacent fields. In many cases, systems like Anaconda provide a one-click install of all the libraries they need—JS on the other hand has no equivalent tool, and the libraries simply do not exist that they need (or are unmaintained—the reader library for the standard astronomy format (FITS) hasn’t been touched in years, and it doesn’t even support the full standard, whereas Python’s equivalent has massive community support and can both read and write FITS).
Third, these ex-scientists are going to write imperative code (for better or worse). Types are an extra thing to think about, and their eyes are going to gloss over if you try to explain the benefit of well designed type systems.
Forth, “write code once, run anywhere” does not exist for deep learning: look at the number of GPU clusters that have been built using NVidia GPUs (rather than AMD or a different chipset). Deep learning is highly tied to hardware, and especially on mobile, you are forced into a specific framework per device in order to get reasonable performance (which in some cases can be critical if a certain application is to succeed). In many cases, using JS would only add to the languages needed, rather than reduce them.
It’s possible that JS may at some point in the future evolve in such a way that it becomes a natural choice for deep learning, but it’s worth keeping the following things in mind:
There’s a general estimate that it takes at least 10 years for a (scientific/numerical) ecosystem to mature: Python’s is 20+ year old (numpy’s predecessors originate in the 90s). Maybe if we wait 10 years the issues with JS will have gone away (stability, diversity of libraries, easy-to-use distributions).
Few languages have broad usage across the different areas of numerical computing, instead they get pigeon-holed into a specific domain, or are domain-specific (see R for stats or STAN for Bayesian analysis)—Python itself still loses to R for stats (and note the use of r2py and Julia’s ability to call Python—languages are added, not removed).
Neither the language nor the tooling of JS especially support numerical computing: you need things Python’s slicing or tools like Cython to make it worth using (R and Matlab have similar language or tooling support). It’s possible JS will add these, but that would be a major change to the language (and you’ve got the lag time for such features to roll out, ex-scientists aren’t the type of people who continuously upgrade their environment).