5 ms·
> Go just isn't designed to make serverside-rendered database-backed websites especially pleasant to write. Citation needed. I’ve had a very nice time. It’s st
by darkr 8y ago
> Go just isn't designed to make serverside-rendered database-backed websites especially pleasant to write.
Citation needed. I’ve had a very nice time. It’s statically typed, has excellent templating support, and is generally very productive.
- latch 8y agoWell, they thought Go would be an alternative to C++ (1) which has never really been the most popular website backend language. I'm glad it's working out for you, but I don't think it's a stretch to say it wasn't really designed for it. On its own, that doesn't mean it's a bad fit; but I agree with your parent and think it's awful for this type of stuff. (1) - https://commandcenter.blogspot.com/2012/06/less-is-exponentially-more.html https://commandcenter.blogspot.com/2012/06/less-is-exponenti...
- xdfgd0ig0dg 8y agoHighly outdated to point out Go would be an alternative to C++. It has been most popular in web-dev, with alot of people switching to Go from Python, PHP or Ruby. Go does web really really well.
- apta 8y agoIt turned out to be more of a replacement for Python for places where you need speed. Then again, a JVM or .NET language would probably be better.
- grogenaut 8y agoIn go, Querying SQL is very much like doing the same thing with the base libraries for mysql in C. Doing the same in most any other language is much much easier and just as safe. Credentials: Worked mainly in go for 4 years... 18+ years coding in about 9 languages. Yes I realized this is opinion.
- nkozyra 8y agoHuh? How is database handling different in Go? You write a parametrized query, the driver prepares it and you deal with the response. MySQLd in PHP is a mirror process, and in fact retains the C function names.
- sheeshkebab 8y agoI think the parent refers to lack of automated result to struct mappers, or maybe lack of decent orm... although it’s probably lacking not due to go features, it’s just that kind of magic is typically not the go way.
- darkr 8y agoThe lack of automated result > data model mappers is kind of by design with statically typed languages. IMO, Go's structs approach is much more lightweight than languages like Scala where large amounts of time can be spent defining exquisite types. Though - one option is to just accept a slice of `[]interface{}` (or an `Any` in Scala), but then you're negating the type-safety provided by statically typed languages. WRT ORMs - Go has ORMs, some of them look reasonable. I'm not a big fan of ORMs in general though. IMHO the only valid use cases for ORM's are for applications that need to support multiple database technologies, or where the application developers don't know SQL.