3 ms·
Perhaps one day we will have properly working wasm stuff and we can forget about all these terrible because-typescript-sucks-because-js-sucks libraries.
by anonzzzies 2y ago
Perhaps one day we will have properly working wasm stuff and we can forget about all these terrible because-typescript-sucks-because-js-sucks libraries.
- progx 2y agoAha, and how you program wasm?
- anonzzzies 2y agoWikipedia; The main goal of WebAssembly is to facilitate high-performance applications on web pages, but it is also designed to be usable in non-web environments.[7] It is an open standard[8][9] intended to support any language on any operating system,[10] and in practice many of the most popular languages already have at least some level of support.
- hombre_fatal 2y agoHow does this have to do with a validation library? These exist for every language so that you can validate unknown data, e.g. user data coming over the wire or data from an external process.
- anonzzzies 2y agoA proper language would just compile that in; aka when something doesn't fit the struct, it dies. That's what zod does because typescript cannot; you can have lovely and complex types until you see blue in the face, but if they are runtime, they pass because it's js. That doesn't happen in other languages. Try some Rust or Haskell and try to stuff in via REST something that doesn't fit in the struct you defined. With typescript it happily continues unless you use all kinds of crap , like Zod, to validate again. Why not make it so typescript has options to compile to zod etc with a flag for runtime? I seriously don't understand why I spend time on writing this as the fanbois who never tried anything nice that doesn't need this think it's the best thing. You all loved left pad and this is no different.