Other than that, generics have not really solved an actual problem for me in the real world. Nice to have, but too mush fuss about nothing relevant.
Other than that, generics have not really solved an actual problem for me in the real world. Nice to have, but too mush fuss about nothing relevant.
I don't like ORM because in my experience you inevitably want full SQL features at some point but not sure if you have the same issues in mind or not
1. Mapping SQL response to maps/structs or mapping maps/structs to SQL parameters might be useful, but that's rather trivial functionality and probably doesn't qualify as ORM. Things get harder when we're talking about complex joins and structs with relationships, but still manageable.
2. Introducing intermediate language which is converted to SQL is bad. Inevitably it will have less features. It will stay in the way for query optimisations. It'll make things much less obvious, as you would need to understand not only SQL, but also the process of translating intermediate language to SQL.
3. Automatic caching is bad. Database has its own caching and if that's not enough, application can implement custom caching where it makes sense.
In my opinion the only worthy database integration could be implemented with full language support. So far I only saw it with C# LINQ or with database-first languages (PL/SQL, etc). C# and Go are like on opposite spectrum of language design, so those who use Go probably should keep its approach by writing simple, verbose and obvious code.
> That is most definitely not true.
I think at best, you could say that Go is a multi-paradigm language.
It's possible to write Go in an object oriented style.
It's also possible to write programs with no methods at all (although you'd probably have to call methods from the standard library).
That's in contrast to a language like Java or Ruby where it's actually impossible to avoid creating objects.
Creating objects on the heap isn't the only defining feature how a language does OOP or not.