July 18th, 2024

First impressions of Go 1.23's range-over-func feature

The author shares positive experiences with Go 1.23's range-over-func feature, initially skeptical but finding it easy to use. Successful adaptation in their project Kivik disproved initial concerns, highlighting benefits for codebase improvement.

Read original articleLink Icon
First impressions of Go 1.23's range-over-func feature

The article discusses the author's initial impressions and experience with Go 1.23's range-over-func feature. Initially skeptical due to complex interface names and a perceived steep learning curve, the author found the feature surprisingly easy to use. They tested the feature on their open-source project, Kivik, and successfully adapted existing iterators to the new functionality. Despite concerns about backward compatibility and the new yield keyword, the author's tests passed, and they were able to create production-ready code in a short time. The author's assumptions about the feature's difficulty were disproven, leading to a positive experience overall. They expressed appreciation for the new feature's simplicity and efficiency, although some adjustments were needed for older Go versions. The author concluded that the range-over-func feature was beneficial and improved the codebase, despite initial reservations. Their experience highlights the ease of adoption and positive outcomes of utilizing this new Go feature.

Link Icon 1 comments