Skip to content

Commit 761b337

Browse files
committed
Add Q&A regarding other languages
1 parent 24c99cd commit 761b337

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

FAQ.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
* [Why use this project?](#why-use)
99
* [Why numeric computing in JavaScript?](#numeric-computing-in-javascript)
10+
* [Why not use R, Python, or Julia?](#other-languages)
1011
* [Why not use native add-ons?](#native-add-ons)
1112
* [What about WebAssembly?](#web-assembly)
1213
* [Why reimplement and provide custom Math implementations?](#custom-math-implementations)
@@ -63,6 +64,7 @@ This project
6364

6465
<!-- </faq-question> -->
6566

67+
6668
<!-- <faq-question> -->
6769

6870
---
@@ -81,6 +83,31 @@ This project
8183
<!-- </faq-question> -->
8284

8385

86+
<!-- <faq-question> -->
87+
88+
---
89+
90+
<a name="other-languages"></a>
91+
92+
### Why not use R, Python, or Julia?
93+
94+
You should use JavaScript because
95+
96+
1. __Language__: you like JavaScript.
97+
1. __Simplicity__: you want to minimize language context-switching, reduce build system complexity, and use a smaller stack.
98+
1. __Flexibility__: you want flexibility. With the exception of Python and few others, most languages commonly used for numeric computing are ill-suited for general purpose applications (e.g., MATLAB is never used to provide an authentication service). While specialization can mean better support for specialized syntax and libraries, specialization also correlates with reduced flexibility and fewer use cases.
99+
1. __Parity__: you recognize that other languages, as languages, have no inherent advantage over JavaScript. With few exceptions, the same criticisms leveled against JavaScript as to why the language is not suitable for numeric computing (e.g., single-threaded, lacks native support for big integers, dynamically compiled, etc) is equally applicable to other languages, such as R and Python. That those languages have risen to prominence is more attributable to chance rather than to comparative advantage.
100+
1. __Browsers__: you want to perform numeric computation in a web browser. JavaScript is, and will continue to be, the language of the Web.
101+
1. __Load__: you want to outsource server-side computation to client applications. A numeric compute-enabled client application can analyze data, train models, and generate predictions with shorter latency and lower server costs.
102+
1. __Node.js__: you want to perform numeric computation in a Node.js application. Node.js is now regularly used by over [98%][node-fortune-500] of Fortune 500 companies (with accelerating industry adoption) and is well-suited for a wide range of applications (including numeric computing) due to its performance and flexibility.
103+
1. __Community__: you want to leverage the continually growing JavaScript and Node.js community. JavaScript has one of the [largest][stackoverflow-developer-survey] and most diverse developer [ecosystems][stackoverflow-developer-survey]. Using JavaScript means greater access to help, expertise, and resources, including tutorials, workshops, and education materials.
104+
1. __Visualization__: you want tighter integration between computation and data visualization. Other languages require intermediary layers to translate computational results into visual artifacts. These layers often involve network requests, longer latency, and increased complexity. Using JavaScript for numeric computation removes the need for intermediaries, allowing immediate and more transparent integration between computation and visualization.
105+
1. __Mad science__: you are interested in mad science applications. Certain applications are only possible in JavaScript due to tight integration between the language and web APIs (e.g., client-based peer-to-peer distributed computing).
106+
1. __Future__: you want to be part of the future: a future where numeric and scientific computation in JavaScript is not only possible, but also inevitable.
107+
108+
<!-- </faq-question> -->
109+
110+
84111
<!-- <faq-question> -->
85112

86113
---
@@ -598,6 +625,7 @@ See the [contributing guide][contributing-guide].
598625

599626
[stackoverflow-developer-survey]: http://stackoverflow.com/research/developer-survey-2016
600627
[module-counts]: http://www.modulecounts.com/
628+
[node-fortune-500]: https://nodejs.org/en/blog/announcements/foundation-advances-growth/
601629

602630
[javascript-ubiquity]: https://blog.codinghorror.com/javascript-the-lingua-franca-of-the-web/
603631

0 commit comments

Comments
 (0)