13 ms·
Does go have any advantage over other compiled languages, like say, swift? For example: https://vapor.codes https://vapor.codes
by hasenj 10y ago
Does go have any advantage over other compiled languages, like say, swift?
For example: https://vapor.codes https://vapor.codes
- kevinburke 10y agoThat's a question with a pretty broad answer. Each language has its own set of tradeoffs and things that it values most highly. In particular Go is shaped by the experience of needing to run high-performance servers at a company with thousands of engineers; it was designed to address a lot of the problems with running C++ or Python in that environment. Swift came from Apple, and was designed to address a lot of the problems with writing mobile apps in Objective-C.
- kenshi 10y agoI don't think Swift was designed to address the problems of writing mobile apps in Objective-C. It seems more like a compiler/language developer's idea of what a good modern language should be.
- rokob 10y agohttp://carlosicaza.com/swiftbooks/SwiftLanguage.pdf http://carlosicaza.com/swiftbooks/SwiftLanguage.pdf Swift was designed for writing apps on the mac platforms, primarily on iOS, and although somewhat debatable as a replacement for Objective-C due to it's quirks. If you want proof of that, just read between the lines in the original documentation. Not to mention, many of the features that were called out originally are direct responses to issues with Objective-C: Optionals, Typed containers, Generics, modules, real first class functions instead of just blocks, final classes, let, etc.
- coldtea 10y ago>If you want proof of that, just read between the lines in the original documentation. Those things were obviously requirements for roles it should fulfill. But no things in its design hold it back from being a modern language that's even more expressive and fast than Go. Except some concurrency love perhaps.
- vram22 10y ago>it was designed to address a lot of the problems with running C++ or Python in that environment. Where have you heard/read the part about Python? Not saying you're wrong, just haven't heard of it. I had heard about the C++ part. I know of some general issues (e.g. static typing, perf), of course, but interested to know which ones Google had (with Python). Edit: The issues I've read about with C++ at Google (in Rob Pike's article) were, IIRC, C++'s complexity and long build times, even with distributed builds.
- russdpale 10y agoCan't speak for swift, but go is writing with asynchronous applications in mind.
- weberc2 10y agoI don't keep up with Swift, but last I checked it didn't have a mature, lightweight concurrency story. Speaking generally, I find that Go is easy to write (like a scripting language), but with static typing. I'm also not familiar with another language that is as easy to get up and running with (Go projects don't require you to learn a new project configuration file language, for example--just run `go build` and you get a binary).
- beat 10y agoThere are roughly a million different compiled languages throughout the history of computing. Every one of them has some sort of advantage over other languages. And of course, there are plenty of interpreted languages too. So the question is, what problem are you trying to solve? Does the language you choose address those problems effectively?
- Gonzih 10y agogo has very well established ecosystem to do low level networking in a very efficient manner. that is based on my experience. you can use go for different problems, but then tooling/libraries around that are not so great/stable. like gui programming for example, auido/video encoding/decoding.