▲ 737 ▼ JavaScript (sh.itjust.works) submitted 2 years ago by sjmarf@sh.itjust.works to c/programmer_humor@programming.dev 88 comments fedilink hide all child comments
[–] morgunkorn@discuss.tchncs.de 138 points 2 years ago (12 children) On the other hand, I don't think you should add those ever permalink fedilink source hideshow 12 child comments replies: [–] firelizzard@programming.dev 52 points 2 years ago (7 children) Sure. But in a sane language doing something totally nonsensical like that is an error, and in a statically typed language it’s a compiler error. It doesn’t just silently do weird shit. permalink fedilink source parent hideshow 7 child comments replies: [–] morgunkorn@discuss.tchncs.de 14 points 2 years ago Agreed! Unfortunately these maddening behaviors were kind of set in stone several decades ago, and it has been (correctly) decided "Don't break the web", these weird quirks are kept in modern interpreters/compilers. It's actually quite interesting to read through the logic to follow when implementing an interpreter: https://262.ecma-international.org/13.0/#sec-object.prototype.tostring permalink fedilink source parent [–] leftzero@lemmynsfw.com 4 points 2 years ago* (1 child) a sane language JavaScript Pick one. permalink fedilink source parent hideshow 1 child comment replies: [–] firelizzard@programming.dev 1 point 2 years ago* I thought it was clear I was saying JavaScript is not a sane language for this very reason permalink fedilink source parent [–] jcg@halubilo.social 1 point 2 years ago (3 children) What's a sane, dynamically typed language? permalink fedilink source parent hideshow 3 child comments replies: [–] firelizzard@programming.dev 3 points 2 years ago I was trying to make a point without starting a flamewar that was beside the point. Personally I’d never choose a dynamically typed language for a production system. That being said, Python and Ruby complain if you try to add an array, dict/hashmap, string, or number to another (of a different type) so they’re certainly more sane than JavaScript. permalink fedilink source parent [–] leftzero@lemmynsfw.com 1 point 2 years ago Lisp? permalink fedilink source parent [–] Lime66@lemmy.world 1 point 2 years ago Any of them which are still strongly typed. Just because a language doesn't check for type errors before runtime doesn't mean it won't check at all permalink fedilink source parent [–] RecluseRamble@lemmy.dbzer0.com 46 points 2 years ago (3 children) Onfuscators probably use it though, so no spec ever will be able to get rid of this crap. permalink fedilink source parent hideshow 3 child comments replies: [–] Windex007@lemmy.world 16 points 2 years ago (2 children) Can I vote for obsfuscators not holding a language hostage? permalink fedilink source parent hideshow 2 child comments replies: [–] msage@programming.dev 7 points 2 years ago Best I can do is tie your pension to it. permalink fedilink source parent [–] intensely_human@lemm.ee 2 points 2 years ago Only if I can vote for sandwiches not falling apart when I eat them permalink fedilink source parent
[–] firelizzard@programming.dev 52 points 2 years ago (7 children) Sure. But in a sane language doing something totally nonsensical like that is an error, and in a statically typed language it’s a compiler error. It doesn’t just silently do weird shit. permalink fedilink source parent hideshow 7 child comments replies: [–] morgunkorn@discuss.tchncs.de 14 points 2 years ago Agreed! Unfortunately these maddening behaviors were kind of set in stone several decades ago, and it has been (correctly) decided "Don't break the web", these weird quirks are kept in modern interpreters/compilers. It's actually quite interesting to read through the logic to follow when implementing an interpreter: https://262.ecma-international.org/13.0/#sec-object.prototype.tostring permalink fedilink source parent [–] leftzero@lemmynsfw.com 4 points 2 years ago* (1 child) a sane language JavaScript Pick one. permalink fedilink source parent hideshow 1 child comment replies: [–] firelizzard@programming.dev 1 point 2 years ago* I thought it was clear I was saying JavaScript is not a sane language for this very reason permalink fedilink source parent [–] jcg@halubilo.social 1 point 2 years ago (3 children) What's a sane, dynamically typed language? permalink fedilink source parent hideshow 3 child comments replies: [–] firelizzard@programming.dev 3 points 2 years ago I was trying to make a point without starting a flamewar that was beside the point. Personally I’d never choose a dynamically typed language for a production system. That being said, Python and Ruby complain if you try to add an array, dict/hashmap, string, or number to another (of a different type) so they’re certainly more sane than JavaScript. permalink fedilink source parent [–] leftzero@lemmynsfw.com 1 point 2 years ago Lisp? permalink fedilink source parent [–] Lime66@lemmy.world 1 point 2 years ago Any of them which are still strongly typed. Just because a language doesn't check for type errors before runtime doesn't mean it won't check at all permalink fedilink source parent
[–] morgunkorn@discuss.tchncs.de 14 points 2 years ago Agreed! Unfortunately these maddening behaviors were kind of set in stone several decades ago, and it has been (correctly) decided "Don't break the web", these weird quirks are kept in modern interpreters/compilers. It's actually quite interesting to read through the logic to follow when implementing an interpreter: https://262.ecma-international.org/13.0/#sec-object.prototype.tostring permalink fedilink source parent
[–] leftzero@lemmynsfw.com 4 points 2 years ago* (1 child) a sane language JavaScript Pick one. permalink fedilink source parent hideshow 1 child comment replies: [–] firelizzard@programming.dev 1 point 2 years ago* I thought it was clear I was saying JavaScript is not a sane language for this very reason permalink fedilink source parent
[–] firelizzard@programming.dev 1 point 2 years ago* I thought it was clear I was saying JavaScript is not a sane language for this very reason permalink fedilink source parent
[–] jcg@halubilo.social 1 point 2 years ago (3 children) What's a sane, dynamically typed language? permalink fedilink source parent hideshow 3 child comments replies: [–] firelizzard@programming.dev 3 points 2 years ago I was trying to make a point without starting a flamewar that was beside the point. Personally I’d never choose a dynamically typed language for a production system. That being said, Python and Ruby complain if you try to add an array, dict/hashmap, string, or number to another (of a different type) so they’re certainly more sane than JavaScript. permalink fedilink source parent [–] leftzero@lemmynsfw.com 1 point 2 years ago Lisp? permalink fedilink source parent [–] Lime66@lemmy.world 1 point 2 years ago Any of them which are still strongly typed. Just because a language doesn't check for type errors before runtime doesn't mean it won't check at all permalink fedilink source parent
[–] firelizzard@programming.dev 3 points 2 years ago I was trying to make a point without starting a flamewar that was beside the point. Personally I’d never choose a dynamically typed language for a production system. That being said, Python and Ruby complain if you try to add an array, dict/hashmap, string, or number to another (of a different type) so they’re certainly more sane than JavaScript. permalink fedilink source parent
[–] Lime66@lemmy.world 1 point 2 years ago Any of them which are still strongly typed. Just because a language doesn't check for type errors before runtime doesn't mean it won't check at all permalink fedilink source parent
[–] RecluseRamble@lemmy.dbzer0.com 46 points 2 years ago (3 children) Onfuscators probably use it though, so no spec ever will be able to get rid of this crap. permalink fedilink source parent hideshow 3 child comments replies: [–] Windex007@lemmy.world 16 points 2 years ago (2 children) Can I vote for obsfuscators not holding a language hostage? permalink fedilink source parent hideshow 2 child comments replies: [–] msage@programming.dev 7 points 2 years ago Best I can do is tie your pension to it. permalink fedilink source parent [–] intensely_human@lemm.ee 2 points 2 years ago Only if I can vote for sandwiches not falling apart when I eat them permalink fedilink source parent
[–] Windex007@lemmy.world 16 points 2 years ago (2 children) Can I vote for obsfuscators not holding a language hostage? permalink fedilink source parent hideshow 2 child comments replies: [–] msage@programming.dev 7 points 2 years ago Best I can do is tie your pension to it. permalink fedilink source parent [–] intensely_human@lemm.ee 2 points 2 years ago Only if I can vote for sandwiches not falling apart when I eat them permalink fedilink source parent
[–] msage@programming.dev 7 points 2 years ago Best I can do is tie your pension to it. permalink fedilink source parent
[–] intensely_human@lemm.ee 2 points 2 years ago Only if I can vote for sandwiches not falling apart when I eat them permalink fedilink source parent