3 ms·
Memory garbage collection, borrow checker, compile-time static typing in dynamic languages (Typescript, Python). Language specific for JavaScript: Strict compa
by stephbook 6mo ago
Memory garbage collection, borrow checker, compile-time static typing in dynamic languages (Typescript, Python).
Language specific for JavaScript: Strict comparison operator === that disables type coercion, together with banning ==.
== allows "5" equals 5.
- Izkata 6mo agoHTML attributes are all strings, so javascript's type coercion in general was this (doesn't just apply to ==) - a way to avoid having to do explicit conversions and make values act semantically equal without having to think about types. A strict ban has always felt to me like we're leaving behind useful functionality.