4 ms·
You don't know what you are talking about. Have you seen any Swift backend used in production? Would you use C++ for a web API? Go was developed because C++ is
by themihai 10y ago
You don't know what you are talking about. Have you seen any Swift backend used in production? Would you use C++ for a web API? Go was developed because C++ is a horibble language and I'm glad it didn't adopt the expressiveness and abstraction from C++.
- superswordfish 10y agoIt really depends on the project. I'd prefer Clojure or Erlang for most frontends, a Lisp for the backend of an expert system, and C++ or OCaml for any heavy lifting. Python still can be a great choice for all sorts of systems too. Swift and Rust aren't quite there yet but for a startup might be worth a look in time. We're not talking about "nobody ever got fired for choosing IBM" business here and being risk-averse is itself risky.
- themihai 10y agoI find swift the worst choice for a start-up right now. Why would you use a language that's only half baked? Don't you have more important things to do than porting the standard library to linux? Not to mention the lack of concurrency. Go can be a grat choice for all sort of systems too and in many cases better than any of the languages you listed. It's about using the right tool for the job and I think your comments about Go are plain ignorant.
- superswordfish 10y agoYou're going after my hyperbolic recommendation (it follows "hell,") and calling me ignorant when we merely disagree. This is a waste of time.
- pjmlp 10y ago> Have you seen any Swift backend used in production? Lots of iOS applications use it already. > Would you use C++ for a web API? Facebook and Google apparently do use it.
- zaphar 10y agoAnd Google is actively replacing a lot of those with Go because using C++ for a web api is painful.
- coldtea 10y agoThat's a myth. Google is not actively replacing anything with Go. Some new stuff is written in Go, and a few small parts here and there were rewritten in Go during a major refactor. There's no active program to rewrite things in Go, and most things are not meant to be written in Go from now on or anything -- it's just one of the supported languages.
- zaphar 10y agoFair enough. I used poor wording there.
- pjmlp 10y agoThe only ones that Google has officially replaced has been on YouTube and downloads server.
- coldtea 10y ago>You don't know what you are talking about. Have you seen any Swift backend used in production? He said "hell, use Swift" -- which didn't imply that he's considering it the first or best recourse. That said: 1) There's far more Swift in production (on iOS devices as native apps, not as backend, but still production code) than Go. 2) Merely 4-5 years ago nobody had seen Go in backend (web/server) production either. Or at least very few. 3) There's already some support for server side Swift: http://perfect.org/ http://perfect.org/ 4) And more: IBM uses Swift for apps AND server side, and has open sourced a Swift web framework/server: https://github.com/ibm-swift/kitura https://github.com/ibm-swift/kitura >Would you use C++ for a web API? If I needed the crude speed yes, and in fact lots of web APIs delegate to C++ behind the scenes (e.g. for task queues), whereas some are in C++ directly. In fact Facebook itself used to transpile PHP to C++ and run that (through their HipHop project). >Go was developed because C++ is a horrible language Go was developed because some old C/UNIX hackers didn't much like C++/Java and wanted to do their own thing, bringing some Plan 9 flavor on. C++, warts and all, has proven itself time and again. Most of the things we depend on and use, from the browser you're using, to JITS and compilers (LLVM for one, V8), to the Windows OS, nearly all major GUI programs (all major DAWs, NLEs, Photoshop, 3D programs, KDEetc), to 99% of AAA games, to Google's search engine core are written in C++. And C++11/C++14 standards have made it a much better, even new, language. The automatic C++ dislike is cargo cult from people who usually don't use it and just repeat old wives tales.
- themihai 10y ago>He said "hell, use Swift" -- which didn't imply that he's considering it the first or best recourse. I've got that but it was too late... the comment was already posted. I've up-voted his response. The rest of your points are invalid. Development is not only about a http server(which I'm sure is subpar compared with Go). You will burry your time and energy in making basic things work. As developer that's great because you can use your experience on your "next" project but as a start-up you are very likely to fail. There may be some IBM developers that played around with the language but I'm sure IBM has no swift powered service in production. Swift is still a language in flux with many changes pending in the next 2 -3 versions. Big corporations don't really like to invest in unstable environments. Maybe in 3-4 years from now Swift will be able to compete with Go but today there is really no reason to use Swift over Go for a backend service. > Go was developed because some old C/UNIX hackers didn't much like C++/Java and wanted to do their own thing I must say it again: C++ is a horrible language. It may perform well and it may be widely spread but that doesn't change much as far as its design is concerned. C++ competes mostly on its reach not on its merits. Hopefully that will change as new platforms emerge(i.e Rust). > In fact Facebook itself used to transpile PHP to C++ and run that (through their HipHop project). Yeah, that's a pretty picture for what C++ is really good for. I rest my case. Edit: I would also say "experienced hackers" instead of "old hackers". The C++ or Swift hackers are not younger anyway.