Code, Creativity & Community

Showing posts tagged Code Quality · View all posts

TypeScript's 'as any' Escape Hatch: When and Why to Use It (Sparingly)
'as any' disables TypeScript's type checking, bypassing safety for convenience. It's tempting, often misused, and occasionally necessary. Understanding when it's justified versus when it signals a type design problem improves... Read more...
PHP 8.4's #[\NoDiscard] Attribute: Preventing Silent Return Value Mistakes
PHP 8.4 introduces the #[\NoDiscard] attribute to catch a common mistake: calling a function for its return value, then ignoring it. It's a small addition with practical impact on code... Read more...