[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Defend this
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 12
Thread images: 3
File: kek.png (5 KB, 261x71) Image search: [Google]
kek.png
5 KB, 261x71
Defend this
>>
File: 1429970739767.png (972 KB, 784x720) Image search: [Google]
1429970739767.png
972 KB, 784x720
>defending shitscript
Go ask hackernews
>>
>>51733427
In JS, they store numbers as strings: https://www.npmjs.com/package/big.js
>>
Our future is doomed. Prepare for a new 1960s software crisis. Everyone should do their best to avoid this shit language and pursue alternatives wherever and whenever possible.
>>
File: sadness.jpg (2 MB, 3000x2000) Image search: [Google]
sadness.jpg
2 MB, 3000x2000
>>51733978
>Our future is doomed.
Our present is doomed. Every popular site requires cookies, will not work without javascript, do not provide RSS, will not work in text-mode browser. They do not even provide a contact email address anymore, only graphical AJAX Javascript HTML form with captchas.
>>
JavaScript stores numbers as double precision floats.
Doubles can't represent 2590837131111111111

#include <stdio.h>

int main()
{
const char *in = "2590837131111111111";
double out;
sscanf(in, "%lf", &out);
printf("%.0lf\n", out);
return 0;
}
>>
>>51734006

True, even if not strictly related to JavaScript. But my real fear is seeing widespread use of that shit language in safety critical machinery, self driving cars, all kinds of human interfaces together with HTML, and the inescapable menace of the IoT.
>>
>>51734089
Real danger is widespread use of shit programmers.
>>
>>51734130

Which goes hand in hand with JavaScript and web development, thanks to the seemingly lower barrier to entry. We can't do much about stupid people, what we must do is make sure they don't cause too much damage with the tools they use.
>>
>>51734006
>>51734089
JavaScript can be done right. You can still have Open Source website.
Cookies, again, can be done right.
>>
OP is dumb, you fried to enter a number larger than what js by default can represent. Can create this same situation in any language. Daily reminder programming languages suit different tasks. It's the person behind the keyboard that determines how well the program is written.
>>
>>51734246

Any decent language / numbers library would throw a parsing exception, which would have to be handled at compile time. Silent failure is the worst of the evils.

JavaScript is simply ill suited for any kind of problem, just like Brainfuck is. Would you argue Brainfuck has any use case? You could always find something better for the task at hand.
Thread replies: 12
Thread images: 3

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.