3 ms·
I looked through the rclone code to see if I could use generics. In particular I looked at places where we use code generation and places where we use reflecti
by nickcw 4y ago
I looked through the rclone code to see if I could use generics.
In particular I looked at places where we use code generation and places where we use reflection - both good candidates for generics.
Alas I found generics just weren't powerful enough to replace these uses, it would need a more powerful macro system.
I think go generics are great for container libraries. I've written and debugged enough of those to be very happy using a library.
I doubt Go will ever get macros though.
I really like Zig's comptime mechanism - that seems like the right amount of power and it's all just zig code!