{"id":9080,"date":"2022-01-23T17:20:26","date_gmt":"2022-01-23T16:20:26","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=9080"},"modified":"2022-01-23T17:20:27","modified_gmt":"2022-01-23T16:20:27","slug":"javascript-insanity","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2022\/01\/23\/javascript-insanity\/","title":{"rendered":"Javascript insanity?"},"content":{"rendered":"<figure class=\"wp-block-post-featured-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"520\" height=\"372\" src=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2022\/01\/javascript-insanity.webp?resize=520%2C372&#038;ssl=1\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" style=\"object-fit:cover;\" srcset=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2022\/01\/javascript-insanity.webp?w=520&amp;ssl=1 520w, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2022\/01\/javascript-insanity.webp?resize=300%2C215&amp;ssl=1 300w, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2022\/01\/javascript-insanity.webp?resize=510%2C365&amp;ssl=1 510w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" data-attachment-id=\"9081\" data-permalink=\"https:\/\/monodes.com\/predaelli\/2022\/01\/23\/javascript-insanity\/javascript-insanity\/\" data-orig-file=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2022\/01\/javascript-insanity.webp?fit=520%2C372&amp;ssl=1\" data-orig-size=\"520,372\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"javascript-insanity\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2022\/01\/javascript-insanity.webp?fit=510%2C365&amp;ssl=1\" \/><\/figure>\n\n\n<p>On <a href=\"https:\/\/www.facebook.com\/#\">Facebook<\/a>\u00a0they write <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>I enjoy JavaScript but this is insanity<\/p><\/blockquote>\n\n\n\n<p>Welcome to a language that has approximate math as the only math you can use.<\/p>\n\n\n\n<p>In fact <code class=\"\" data-line=\"\">7110 \/ 100 * 100<\/code> is <code class=\"\" data-line=\"\">7109.99999999<\/code> because the first division cannot be exactly represented with with a floating point representation.<\/p>\n\n\n\n<p>Sites like <a href=\"https:\/\/baseconvert.com\/ieee-754-floating-point\">https:\/\/baseconvert.com\/ieee-754-floating-point<\/a> come handy&#8230;<\/p>\n\n\n\n<p>Those are the moments when I rejoice for choosing Eiffel as my favourite language <\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">On Facebook\u00a0they write I enjoy JavaScript but this is insanity Welcome to a language that has approximate math as the only math you can use. In fact 7110 \/ 100 * 100 is 7109.99999999 because the first division cannot be exactly represented with with a floating point representation. Sites like https:\/\/baseconvert.com\/ieee-754-floating-point come handy&#8230; Those are&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2022\/01\/23\/javascript-insanity\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":9081,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[105,50],"tags":[],"class_list":["post-9080","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fun","category-javascript"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2022\/01\/javascript-insanity.webp?fit=520%2C372&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-2ms","jetpack-related-posts":[{"id":1737,"url":"https:\/\/monodes.com\/predaelli\/2016\/08\/18\/math-js\/","url_meta":{"origin":9080,"position":0},"title":"math.js","author":"Paolo Redaelli","date":"2016-08-18","format":"link","excerpt":"Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser. Sorgente: math.js","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":297,"url":"https:\/\/monodes.com\/predaelli\/2015\/06\/12\/javascript-other-languages\/","url_meta":{"origin":9080,"position":1},"title":"JavaScript + Other Languages","author":"Paolo Redaelli","date":"2015-06-12","format":"link","excerpt":"JavaScript+OtherLanguages Those slides JavaScript + Other Languages are really useful to implement an eventual Eiffel to JavaScript compiler. Well, actually it should be called transcompiler.... We could just feed the C files made by current Liberty compiler but it seems to me that passing throught C which is a procedural\u2026","rel":"","context":"In &quot;Eiffel&quot;","block_context":{"text":"Eiffel","link":"https:\/\/monodes.com\/predaelli\/category\/eiffel\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13886,"url":"https:\/\/monodes.com\/predaelli\/2025\/08\/19\/crazy-javascripts-date-class\/","url_meta":{"origin":9080,"position":2},"title":"Crazy JavaScript&#8217;s Date class","author":"Paolo Redaelli","date":"2025-08-19","format":false,"excerpt":"new Date(\"wtf\") How well do you know JavaScript's Date class? JavaScript is a crazy, mad language. Or better, it's library is crazy. You can mostly blame automatic convertions","rel":"","context":"In &quot;Fun&quot;","block_context":{"text":"Fun","link":"https:\/\/monodes.com\/predaelli\/category\/fun\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4792,"url":"https:\/\/monodes.com\/predaelli\/2018\/10\/28\/telosys-code-generator-for-java-javascript-python-nodejs-php-c-etc\/","url_meta":{"origin":9080,"position":3},"title":"Telosys code generator for Java, JavaScript, Python, NodeJS, PHP, C#, etc","author":"Paolo Redaelli","date":"2018-10-28","format":false,"excerpt":"Telosys is a free code generator usable with different languages or frameworks : Java, JavaScript, Python, NodeJS, PHP, GoLang, C#, Angular, VueJS, etc Sorgente: Telosys code generator for Java, JavaScript, Python, NodeJS, PHP, C#, etc","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":15394,"url":"https:\/\/monodes.com\/predaelli\/2026\/03\/29\/nobody-gets-fired-for-picking-json-but-maybe-they-should\/","url_meta":{"origin":9080,"position":4},"title":"Nobody Gets Fired for Picking JSON, but Maybe They Should?","author":"Paolo Redaelli","date":"2026-03-29","format":"link","excerpt":"Nobody Gets Fired for Picking JSON, but Maybe They Should? By Miguel Young de la Sota Nobody Gets Fired for Picking JSON, but Maybe They Should? JSON is extremely popular but deeply flawed. This article discusses the details of JSON\u2019s design, how it\u2019s used (and misused), and how seemingly helpful\u2026","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5128,"url":"https:\/\/monodes.com\/predaelli\/2019\/01\/15\/removing-javascripts-this-keyword-makes-it-a-better-language-heres-why\/","url_meta":{"origin":9080,"position":5},"title":"Removing JavaScript\u2019s \u201cthis\u201d keyword makes it a better language. Here\u2019s why.","author":"Paolo Redaelli","date":"2019-01-15","format":false,"excerpt":"Removing JavaScript\u2019s \u201cthis\u201d keyword makes it a better language. Here\u2019s why. Removing JavaScript\u2019s \u201cthis\u201d keyword makes it a better language. Here\u2019s\u00a0why. Cristi Salcescu Jan this is of course the source of much confusion in JavaScript. The reason being that this depends on how the function was invoked, not where the\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/9080","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=9080"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/9080\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media\/9081"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=9080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=9080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=9080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}