Erik Engheim
Mar 28, 2021

--

Thanks for your suggestion! I have updated the article based on your advice.

Yes, I know there are Java libraries using reflection, but I wanted to demonstrate the solution most people are likely to encounter. When I Googled this, the usage of an explicit object-mapper was the solution I repeatedly encountered, so this seems pretty common in the Java world.

I don't actually know what to think about Go generics. I am not 100% convinced Go needs them. My concern is possible increased complexity.

For C++ template based programming has been quite a disaster IMHO.

I admit though that the generics proposal for Go looks quite good. It reminds me of generics in Swift which works a lot better than generics in C++.

--

--

Erik Engheim
Erik Engheim

Written by Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

No responses yet