Click any tag below to further narrow down your results
Links
This article explains the new errors.AsType function in Go 1.26, which offers a type-safe way to check for specific error types. Unlike the older errors.As, it simplifies code by eliminating the need for intermediate variable declarations and reduces the risk of runtime panics. It's recommended for new code while errors.As remains available.
The author reflects on their initial misconceptions about TypeScript, highlighting its shortcomings, especially its error handling and reliance on the `any` type. They argue that TypeScript's type system lacks the strictness and runtime enforcement found in languages like Rust, leading to potential runtime errors.
This article explains what NaN (not-a-number) is in JavaScript and how it behaves in mathematical operations and comparisons. It highlights the unique properties of NaN, including that it is not equal to itself, and discusses methods to check for NaN values correctly.