Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's interesting to consider generics.

Go gained some simplicity by not having generics, instead simply special-casing the two most common generic datastructures: lists and maps. But in the end, the desire for generics was too strong, and now they're adding them to the language, and losing that simplicity win.

Zig gained simplicity by not having generics, but instead giving you comp-time evaluation, which can do everything generics can do and more (e.g., replaces need for preprocessor, need for minilanguage for build variants).

I do think both languages have similar philosophies and feel, though Zig is much lower level, and seems to have more of a focus on "get things exactly right" vs. maybe more of a "eh, good enough / hacky" approach from Go.

I wonder what a language that tried to combine this focus on smallness/orthogonality with a borrow checker would look like. (Would it even be possible?)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: