4 ms·
> We believe JavaScript, instead of Python, could act as an ideal language for expressing mathematical ideas if the proper infrastructure existed. It would be
by nahuel0x 6y ago
> 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.
- pragmatic8 6y agoIndeed. 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.
- johannes1234321 6y agoAs 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.
- nahuel0x 6y agoJS now has BigInt, an integer type with arbitrary precision.
- stjohnswarts 6y agoAnd 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
- johannes1234321 6y ago> 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/Reference/Global_Objects/BigInt 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/ 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 :)
- nahuel0x 6y agoBigInt as added in ECMAScript 2020, you are seeing and old version: https://262.ecma-international.org/11.0/ https://262.ecma-international.org/11.0/
- johannes1234321 6y agoThanks! I thought I clicked on the latest.
- christophilus 6y agoAgreed. At first glance, JavaScript's number implementation seems far from ideal for real computations. I wonder what they have in mind.
- nerdkid93 6y agoDeno has first class support for WASM, I wonder if using that runtime for number crunching is better than how Python does numeric computations.
- deleted 6y ago[deleted]
- stjohnswarts 6y agoI agree. Seems like pandas and numpy (et. al.) are doing okay these days. Yeah I know they use some c stuff underneath but still...
- krona 6y agoJavaScript doesn't have operator overloading. Implementing something even half as ergonomic as numpy in javascript isn't possible.