Hacker News new | ask | show | jobs
by tptacek 4850 days ago
Well, Go has a bunch of libraries for different SQL servers. I wouldn't go so far as to say it has lots of good SQL stuff; it's in approximately the same place as C is w.r.t. databases.

Having to interface with complicated SQL is a reason not to use Go (but not an insurmountable one).

2 comments

> it's in approximately the same place as C is w.r.t. databases.

I think the existence of a standardized interface like `database/sql` makes things strictly better.

An anecdote: I started making a new web application using MySQL. As soon as I realized the error of my ways (not because of the driver), I swapped out a single import from the MySQL driver to the PostgreSQL driver, and everything continued to work as it did before.

[EDIT] Anyone care to explain the down-votes?

The downvotes are likely because they're reading your MySQL-to-Postgres anecdote as the firing of a shot in an unrelated battle many love to hate, if not a mild troll.
Ah, right. My bad. The folly is still fresh, and there is still a bit of pent-up rage that I hadn't made this discovery sooner.
I think it has lots of good SQL stuff just because I think it laid a nice foundation for developers to build SQL libraries on, and I think there's a lot of potential for using SQL in Go to get dramatically better in the next year or so. That said, I'm not an SQL expert or even very competent, so I'm probably not the best to comment on it--I just included it for the sake of addressing all the points.

I would agree, though--working with SQL is the worst part of the software I'm currently writing in Go. I think that's more a praise of working with Go than a condemnation of its SQL support, though.