Go 1.18 Generics: Toward the End of a Long Wait
Go 1.18's generic support shows how a language can be reshaped thoughtfully: why Go waited, the type parameter syntax, first impressions and trade-offs.
Category
Features, syntax and practices of the PHP, JavaScript, TypeScript, Go and Python languages, with release notes and worked examples. (Page 4/9)
This category has 49 posts.
Go 1.18's generic support shows how a language can be reshaped thoughtfully: why Go waited, the type parameter syntax, first impressions and trade-offs.
PHP 8.1 isn't out yet, but I'm already exploring how the upcoming native enum support and readonly properties will reshape domain modelling.
A practical look at PHP type conversion and coercion: gettype, settype, var_dump, and why strict_types belongs in every file.
Building reusable, type-safe abstractions with TypeScript generics: how type inference and extends constraints work, and when a union fits better.
A practical approach to error handling as a Go language idiom: the error value, wrapping, custom error types and a PHP developer's adjustment period.
How we represented fixed value sets before PHP 8.1 introduced native enums: class constants, a package and backed classes, and the trade-offs of each.