Reads, blog drafts

This commit is contained in:
Pascal Engélibert 2025-12-21 18:54:05 +01:00
commit e92401bb76
12 changed files with 932 additions and 13 deletions

View file

@ -26,14 +26,17 @@ JavaScript is obviously not made for being used in webpages.
* no native basic templating system (need `String.replaceAll("{{foo}}", foo)`)
* no easy-to-use bytes array (like `Bytes` in Python or `Vec<u8>` in Rust), but many different bytes arrays with weird interfaces
* no native cryptographic primitives if you aren't using HTTPS and satisfying other strange "security" requirements (you often end up inefficiently implementing SHA2 or AES in JS, while the browser natively uses OpenSSL)
* multithreading ("web worker" because it's web we need fancy names) requires a separate source file, hence an additional network request
* no native date/time string formatting
* When defining an anonymous function (such as a callback) you can't reliably move variables to it.
Having a decent standard library would reduce the use of weird hacks hence the number of bugs, and the use of libraries hence the traffic and webpage size and loading time.
Compare it to Python, which has a good set of standard types, easy to use and equipped with most of expected methods (even if some obvious ones are missing, like `signum`).
Knowing all that, I couldn't stand hearing Rust's standard library is too light.
## What the fuck
JavaScript doesn't respect anything.
JavaScript respects nothing.
* You never know whether you're copying or borrowing (a table or an object), and how deeply.
* Python suffers the same problem.