Hacker News new | past | comments | ask | show | jobs | submit login

> We believe JavaScript, instead of Python, could act as an ideal language for expressing mathematical ideas if the proper infrastructure existed.

It would be nice to read a rationale about this.




I agree. Seems like pandas and numpy (et. al.) are doing okay these days. Yeah I know they use some c stuff underneath but still...


Agreed. At first glance, JavaScript's number implementation seems far from ideal for real computations. I wonder what they have in mind.


Deno has first class support for WASM, I wonder if using that runtime for number crunching is better than how Python does numeric computations.


Indeed. I find this to be a rather strange opinion; in terms of the language itself, I can’t really say one is better than the other for expressing mathematics.


As long as we're sticking to core language JavaScript is not the right answer as the only numeric type, Numeric, is a IEE-754 "double". For lots of maths however integer semantics are better suited.

Python has arbitrary sized integers in the language, which even improves the usefulness.

Of course libraries and extensions could eventually help.


JS now has BigInt, an integer type with arbitrary precision.


And python doesn't? It has bignum, is that inferior? It is also arbitrary precision. Seems like to claim javascript has "sufficient" numerical properties would be better than claiming it is far superior to python. To do otherwise seems like FUD


> And python doesn't?

That's not what they stated. They corrected me and pointed me to BigNum.

BigNum is documented in MDN as a "Global Object" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... I don't find a reference to it in the ECMAScriot standsrd, https://262.ecma-international.org/10.0/

Thus I claim the Python approachbiss till better in that specific area.

I don't know Deno's source for their claim. Certainly relevant is what area of Maths you're looking at. For instance looking at reread rations for vectors and matrices might be relevant for different maths problems. The functional approach in some of these things also might be interesting for some Maths problems ... broad topic :)


BigInt as added in ECMAScript 2020, you are seeing and old version: https://262.ecma-international.org/11.0/


Thanks! I thought I clicked on the latest.


JavaScript doesn't have operator overloading. Implementing something even half as ergonomic as numpy in javascript isn't possible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: