According to the stackoverflow survey Go popularity has risen from 4.3% to 7.1%

agolangf · · 930 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>According to the stackoverflow survey 2018, over the past year, Go popularity has risen from 4.3% to 7.1%</p> <p><a href="https://insights.stackoverflow.com/survey/2018#technology">https://insights.stackoverflow.com/survey/2018#technology</a></p> <hr/>**评论:**<br/><br/>tywkeene: <pre><p>From spending a lot of time writing Go and trying to find a job writing Go, I feel like it&#39;s really an untapped resource. It&#39;s a really solid language for cloud computing, it&#39;s easy to learn (even at a higher, production-ready level) and it has <em>really</em> solid standard lib, documentation and community.</p></pre>BowsersaurusRex: <pre><p>Let me prefix this by saying that I use Go and C# on a daily basis. Go is great.</p> <p>My main problem with the platform is that .NET exists. Specifically .NET Core. Go and .NET Core are extremely similar, except C# is far more mature and has far better tools simply because it&#39;s been around for so long. Feature wise, Go almost feels like a pure subset of .NET Core which makes it very hard to justify its use for new projects.</p> <p>Performance is comparable.</p> <p>To make matters worse, .NET Core is actually easier to get started with since there&#39;s no messy environment, path, or directory management.</p> <p>We generally use it on projects in which the lead developer simply refuses to touch anything associated with Microsoft. Or because people have outdated knowledge on .NET and think it runs slowly or only on Windows.</p> <p>I&#39;m hoping Go branches out and does something unique that makes it easier to recommend. The more .NET Core spreads into Linux environments the more Go will end up living in its shadow.</p></pre>Thaxll: <pre><p>I don&#39;t think net Core will ever eat Go because they&#39;re a bit different, net core needs a VM, Go doesn&#39;t, you can compile Go into a single binary where net core is like Java with a &#34;bloated&#34; runtime.</p> <p>Even when you look at the libraries Go is more mature in terms of backend services, Kestrel is not production ready for instance.</p></pre>BowsersaurusRex: <pre><p>.NET Core can build self contained binaries. Future versions of .NET Core will have method level trimming of runtime features from the build output.</p> <p>Kestrel is production ready. It&#39;s designed to be used by a reverse proxy. Go should also be used by a reverse proxy. Neither should be public facing.</p></pre>ar1819: <pre><p>Go works perfectly without any sort of reverse proxy. In low latency scenarios it&#39;s actually preferable, since nginx introduces additional overhead, and there are times when you really don&#39;t want to pay for this. Since most of the crypto stuff is implemented using platform dependent assembly, it&#39;s also pretty fast. Last time I checked cloudflare infrastructure worked like that. </p> <p>There is also fact that I can just launch Go web app with some sort of the embedded database inside my ODROID box, and it will do ok. I know it&#39;s not a big deal, but the fact that I don&#39;t have to deploy the usual proxy/app/database/cache stack is very uplifting. I don&#39;t want my little home application to be &#34;webscale&#34;. I just want it to work. </p></pre>DocMerlin: <pre><p>Go actually works better (much faster) without a reverse proxy. <a href="https://blog.gopheracademy.com/advent-2016/tls-termination-bench/" rel="nofollow">https://blog.gopheracademy.com/advent-2016/tls-termination-bench/</a></p> <p>In fact there are some rather good reverse proxy implementations that are built in go <a href="https://github.com/containous/traefik" rel="nofollow">https://github.com/containous/traefik</a></p></pre>BowsersaurusRex: <pre><p>Of course it does, but I still wouldn&#39;t expose it directly to the public internet.</p></pre>scottjbarr: <pre><p>People have an aversion to MS for a reason, but at the root it is typically burned trust. When it catches you out, you&#39;ll know get it. If it has caught you out and you&#39;re still on that train, you&#39;re a very trusting person indeed :)</p> <p>The problem with .NET on anything other than Linux is that every so often it proves to be a second class citizen on anything other than Windows. I tried trusting MS again with .NET core, and not long in evaluation... Boom! Hello Linux the 2nd class citizen. I can&#39;t remember the exact issue, but it was along the lines of exbrace/extend, bait/switch or Windows first/only. Once trust is burned it takes quite some time to earn it back.</p> <p>You don&#39;t have to look far to find a bunch of examples in recent history. Others can list them if they like.</p></pre>BowsersaurusRex: <pre><p>I would be curious to see what the issue was since the .NET Core team is composed of Linux enthusiasts who operate largely independent of Microsoft. .NET Core is open source, on GitHub, and has a lot of community contribution.</p> <p>I keep seeing people make vague references to this happening with .NET and .NET Core, but rarely do people provide any concrete details.</p> <p>Do you have links to the GitHub issues?</p></pre>tristan957: <pre><p>I&#39;m excited to see .NET Core more available on Linux and Mac. I also think that Microsoft has kind of made so that you have to use Visual Studio to have a good experience writing C#/.NET. I think they are moving in the right direction, especially with the C# support in VSCode. I&#39;m excited for the future of VSCode and development of Core :)</p></pre>BowsersaurusRex: <pre><p>VS Code on Linux is great. I use it for C# and Go.</p> <p>But C# with Visual Studio is definitely the best experience. The amount of tools at your disposal is insane. I&#39;ve unfortunately become addicted to historical debugging. :P</p></pre>PaluMacil: <pre><p>I really love Core and after having had similar time working with both, I agree that both are great, but I vary from you a little on the conclusion. I don&#39;t necessarily think Core has better tooling and setup. I tend to favor Go for those features. As far as library support goes, I go either way. I wrote an Active Directory integration once and actually chose Go because once I realized I would need to use some raw LDAP either way for my particular needs, C# didn&#39;t add anything extra. Sometimes I need something .Net gives me, but usually it ties into something where I wind up needing Framework, so I don&#39;t get any of the nice things from Core anyway. I do prefer C# (or Typescript) for desktop, but for a cli I love Go. Web can be fine either way. Both are a pleasure.</p> <p>In the end, the reason I prefer Go when things are even is that you don&#39;t get clever things from a previous developer nobody can figure out in Go. In C# you&#39;ll eventually get an application that imports assemblies at runtime, does reflection on them, and puts them together in a way that will take you months to decide. In Go you might find someone spending an extra hundred lines of code somewhere to stick to the standard library, whereas in .Net you&#39;re more likely to find that each product has it&#39;s own unique homebrew ORM. ?</p></pre>BowsersaurusRex: <pre><p>My problem with Go tooling and setup is that I&#39;m always wrestling with the GOPATH or directory structure or some other BS.</p> <p>I wish they would fix this. It&#39;s my biggest complaint.</p></pre>tiborvass: <pre><p>It&#39;s being fixed: <a href="https://research.swtch.com/vgo" rel="nofollow">https://research.swtch.com/vgo</a></p></pre>Phr0ztByte: <pre><p>Wrestling with GOPATH? </p> <blockquote> <p>$HOME/go on Unix-like systems</p> <p>%USERPROFILE%\go on Windows</p> </blockquote> <p>It really is not that hard. I was a C# dev, well before .net core. I relied in VS almost exclusively for a long time. I moved to Python, Java and Go on Linux, and I see no reason to go back. I feel no less productive, and C# has no real benefits over any of the above. </p></pre>BowsersaurusRex: <pre><p>Specifically, having to specify one at all, which you don&#39;t need to do in .NET Core.</p> <p>And needing to keep projects in a specific directory structure is counter productive.</p> <p>I wish they would fix this.</p> <p>Regarding C# features that Go lacks, I could compile a long list. The most glaring is the lack of generics. It makes Go feel like .NET 1.0, including the exact same work arounds and arguments.</p></pre>Phr0ztByte: <pre><p>Regarding project structure. It has never been a problem. My source usually lives in a specific folder anyways. Would it be nice if I could choose, sure. But it is not a glaring problem. Once I coded go for a while, I didn&#39;t miss generics anymore. And the verbosity of the language makes it easy to read and understands. There is no &#34;clever&#34; code anywhere. </p> <p>I like C#, don&#39;t get me wrong. I am just saying, after been coding Go for a while, I don&#39;t miss it. Every project I wanted to do, I have done, and a lot faster than I would have done it in C#. </p></pre>abstart: <pre><p>Exactly, C# can be used to generate very complicated code using multiple inheritance, extensions, linq and other ways to express functions, loops and conditions, lambda syntax, and tags. These can build in a huge technical mental burden into the code for anyone new to the system. Go is like C#-Lite and that&#39;s a good thing (*sometimes).</p></pre>recurrency: <pre><p>After two years of go I still for my life can&#39;t <em>understand</em> the complaints about the GOPATH. It&#39;s the greatest relief of all time.</p> <p>Just put your stuff in ~/go, you are done and voilà you have a fantastic way of keeping things organized. </p> <p>I even put all non-go projects in the Path, since it&#39;s just such a great idea to have it symmetrically organized with the source repo urls. </p></pre>rotharius: <pre><p>Because one wants to manage dependencies and pin down versions per project and in the project repository. Not in some machine/environment specific directory.</p> <p>Every mature language has this (although it also kinda sucks in Python).</p></pre>sethammons: <pre><p>Is this not exactly what vendoring does?</p></pre>rotharius: <pre><p>Yes, it is. But I don&#39;t see why a GOPATH is necessary for that. In fact, I want to isolate my projects.</p></pre>allowthere: <pre><p>Does .net compile to static executables or do you run it in a JVM like JIT compiler?</p></pre>BowsersaurusRex: <pre><p>.NET Core can be compiled with or without the runtime. If you compile it without the runtime then the runtime needs to be installed. If you compile it with the runtime, then the runtime will be included in the executable but trimmed down to only to the parts you&#39;re using.</p> <p>.NET Core is jitted, it does not run on a VM. Ahead of time compilation will be added in a future version.</p> <p>Jitting has it&#39;s advantages. It can produce code optimized for a specific machine instead of just a specific build environment.</p> <p>Jitting also has the benefit of being able to dynamically emit code, which can provide a huge performance boost in certain scenarios.</p></pre>abstart: <pre><p>Just started a Go project, and I agree C# .net core is very attractive. It was the main other language we were considering.</p> <p>But .net core is still new, so yes people will be worried about it (from what I read, msbuild support was just added in august).</p> <p>When I looked at the setup for C# .net core, it looked more complicated with more dependencies. Go is easy (ok so set a gopath variable not a big deal). Installing on linux or windows is easy.</p> <p>Depending on the developers on the team, it is much easier to write very magical and complicated C# than it is to do the same in Go, and Go is easier to pick up for new developers. These are really important business attributes for long term projects that don&#39;t need the extra power of C#.</p></pre>golang_or_nolang: <pre><p>And something that&#39;s often overlooked is its leadership. Rob Pike and Ken Thompson have been industry leaders for a very long time (although C is outdated now), and their wisdom is often overlooked.</p></pre>PaluMacil: <pre><p>I think outside the west coast and known Go-using companies, there are a lot of places that use Go but don&#39;t mention it in job postings. I&#39;ve worked with two teams where they had Go code but only posted to hire .Net devs. Sometimes you have to get lucky, and then as you gain seniority, you will also gain the ability to make some of your own decisions in this regard.</p></pre>tywkeene: <pre><blockquote> <p>but only posted to hire .Net devs.</p> </blockquote> <p>See, I always just completely ignore those postings. I don&#39;t use windows, haven&#39;t used it in years and don&#39;t plain to in the future. Ever.</p> <p>Double goes for .Net</p></pre>PaluMacil: <pre><p>Sure, and I don&#39;t entirely know why management and or HR chooses to have inaccurate postings, but my assumption is that they don&#39;t believe they will find a go developer and simply want a developer that will fit in with the rest of the stack. It is annoying since it makes it nearly impossible to find a lot of those go jobs since go will not be listed in those cases. I just don&#39;t know a way to find those jobs other than getting lucky when you&#39;re hired for a Java, Python, C#, or Ruby job and suddenly you are a go developer instead. ?</p> <p>That said, one of the teams I&#39;m mentioning did not deploy to Windows. It was 100% .Net core on Ubuntu Linux with Docker and Postgres, so C# does not necessarily mean a Windows stack. I strongly prefer Linux to Windows but also think C# is a pretty good language, especially if you use .Net Core and VS Code. </p></pre>BowsersaurusRex: <pre><p>You are aware that .NET runs on Linux, right?</p></pre>tywkeene: <pre><p>Didn&#39;t but it doesn&#39;t really matter. Go has much better support for Linux, and I grew up on Linux and I make a living on Linux.</p> <p>Really no reason to use anything else. Especially something ported from windows.</p></pre>BowsersaurusRex: <pre><p>Can you provide examples for Go having much better support for Linux?</p></pre>ar1819: <pre><p>I can. Syscall interface and whole interaction with Linux is horrible. Working with libvirt, for example, is impossible under Linux unless you are using mono (and no, it&#39;s not even remotely bugs free - I see it everyday just by seeing random freezes and crashes in my KeePass).</p> <p>The language itself feels overcomplicated. And that&#39;s coming from C++ dev, mind you. The actual performance is subpar - check the techempower benchmarks, especially database related tests.</p> <p>I don&#39;t mind Microsoft projects - in fact I use Windows as my home system. And I don&#39;t mind Net since they have one of the most powerful GUI toolkits. But if we talk about Linux networking - I would really like to have the first class citizen support.</p> <p>Honestly, you have better chances to convince someone to use Java/Kotlin on Unix environment in this sub. At least they were designed to be cross platform from the start - and JVM ecosystem is second to none (npm module that doesn&#39;t do anything useful doesn&#39;t count as an ecosystem). </p> <p>P.S. C# crypto is slow everywhere but Windows. This is just sad. </p></pre>BowsersaurusRex: <pre><p>I mainly use .NET Core on Linux for cloud services, so I&#39;ve never dealt with syscalls.</p> <p>I use C++ quite often. Personally, I think C# is an extremely clean and simple language. It&#39;s behavior is well defined and predictable. C++ macro hell and template hell makes it one of the most unweildy and complex languages in existence. But I will admit that C# has a bit too much syntax sugar.</p> <p>If I recall correctly, .NET Core 2.0 crypto uses the underlying platform implementation on Linux.</p></pre>ar1819: <pre><p>If we talk about web or cloud applications: basically CRUD with semi to very complex business logic - there is no bad choice. Since most of your app logic isn&#39;t tied to underlying OS mechanics you can use anything from Node and Elexir to Java EE. It&#39;s just a matter of personal taste and project required functionality. </p> <p>I don&#39;t think that Go really shines in that area tbh, since most of the business logic is quite repetitive and you want to remove as much boilerplate as you can using language features. This is where having syntax sugar and a rich collections is a good thing.</p> <p>But not every app is a CRUD that do not care about the underlying OS ?</p></pre>BowsersaurusRex: <pre><p>That&#39;s my point, when choosing between Go and .NET Core for cloud services there&#39;s no real reason to choose Go since it&#39;s missing a lot of features, even though Go is great.</p> <p>Although cloud services can be a lot more than just CRUD and business logic.</p></pre>tywkeene: <pre><p>I can&#39;t, nor do I care to.</p> <p>I will die before I develop .Net on Linux.</p> <p>I made a big assertion. You got me.</p></pre>BowsersaurusRex: <pre><p>I don&#39;t blame you. Logical decisions based on data have no place in programming.</p></pre>tywkeene: <pre><p>Yep.</p> <p>It&#39;s logical to use a language ported from another OS over one with native support.</p></pre>Rizens: <pre><p>In my opinion this is just the beginning. More and more company are going to turn to Go for API &amp; Back End.</p> <p>Go &#34;out of the box performance&#34; &amp; architecture really makes it a perfect fit for low latency application and large traffic applications , especially compared to NodeJS or Java.</p> <p>Wouldn&#39;t be surprised if the language went to 12% or so in the coming 2 years .</p></pre>cbll: <pre><p>Yeah I&#39;m a Java dev primarily but I&#39;ve been fiddling a lot with Go for smaller stuff(data processing, taskrunners mainly) and it&#39;s incredibly fast and performant for the amount of code you write.</p> <p>A ~50 line Go program would be 7-8 classes in Java sometimes.. And the Go program oftentimes perform better.</p></pre>nwss00: <pre><p>Go replacing Java, albeit unlikely, would be fantastic.</p> <p>I&#39;d even settle for just Kotlin replacing Java!</p></pre>cbll: <pre><p>Java isn&#39;t going anywhere. It&#39;s bearable with Lombok annotations, though. But yeah - I hope to use Kotlin some day, it&#39;s difficult to argue for when no one knows it and everyone would prefer Java because it&#39;s comfortable..</p></pre>PaluMacil: <pre><p>A small dev shop near me is nearly 100% Kotlin in as small a place as Grand Rapids MI, so you might be able to find was small Android team near you that writes Kotlin, if that&#39;s interesting to you. It seems like phone app dev shops are small enough to enjoy languages like that more frequently.</p></pre>cbll: <pre><p>Step one, acquire US Visa :P</p></pre>PaluMacil: <pre><p>Yeah, I don&#39;t mean to imply that I think everyone in this community is American, and I don&#39;t know what it&#39;s like in other markets. </p></pre>cbll: <pre><p>Can say that here in Denmark, nobody uses Kotlin. But we&#39;re a Microsoft country.. so C# is mostly all the rage</p></pre>Rizens: <pre><p>UK is also a very .NET C# country. Microsoft really did a great job selling their stuff.</p></pre>PaluMacil: <pre><p>It&#39;s true trends aren&#39;t distributed evenly. I went from a team that was moving from C# to Go to a team that is 100% C#, making me a mere Go hobbyist again. (sigh) At least I spent enough time in Go to be comfortable and efficient in my own projects now.</p></pre>BowsersaurusRex: <pre><p>I posted about this above, but our main issues is .NET Core. It&#39;s very difficult to recommend Go above .NET Core since .NET Core matches it in performance and portability but has far more features and far more mature tools.</p> <p>Go code is a bit less verbose than many C# projects, but you could just throw your entire codebase inside a single C# class and get a similar result.</p> <p>Go needs its killer feature. Something C# can&#39;t do. I&#39;d like to use it more.</p></pre>kaeshiwaza: <pre><p>The killer feature of Go is to don&#39;t have too much features. For C# to beat Go it needs to remove some features like inheritance, generic, overloading...</p></pre>zoweee: <pre><p>Just curious since you&#39;ve mentioned needing a &#34;killer feature&#34; a couple of times: do you not find go-routines or the interface system to be unique and compelling? I&#39;ve found that the trivial concurrency of go-routines have really shaped the way I write software (in fact I feel a little claustrophobic without them) and the ability to design interfaces and implementations of those interfaces has made me a much better producer of modular software.</p></pre>chriselliott82: <pre><p>Go in time will take over node. Even the guy that made node says go is better!</p></pre>alierbey: <pre><p>we have a company that make developing smarthome technology. and we almost used to for 4 years at go. we are like everytime because it is very fast language</p></pre>MrPhatBob: <pre><p>We are replacing all of the video streaming components that we had written in Go - because of the cost savings which are demonstrable with the cloud servers we run our stack on.</p></pre>NeedsMoreTests: <pre><p>I read that sentence over five times and still don&#39;t get it. Please unbreak my brain with one of the following choices:</p> <ul> <li>You&#39;re replacing the stuff you had written with Go and can demonstrate the cost savings in your cloud environment.</li> <li>You&#39;re replacing the code you wrote in Go with the cloud.</li> </ul> <p>The first one makes more sense. The second one may make sense with a serverless type approach but without more specifics it sounds like &#34;Just put it in the cloud!&#34; ha.</p></pre>defaultprimate: <pre><p>They are rewriting the video streaming components, which are not currently in Go, in Go</p></pre>NeedsMoreTests: <pre><p>You sure because that&#39;s not what it says:</p> <blockquote> <p>we <strong>had written</strong> in Go</p> </blockquote> <p>Pretty sure you&#39;re right, it&#39;s the thing that makes the most sense....but I asked anyway since you never know.</p></pre>MrPhatBob: <pre><p>Yes, this.</p></pre>MrPhatBob: <pre><p>Miss-keyed quite badly there. Let me re-word it with a little more clarity.</p> <p>We are re-writing the components that we had written in <em>NodeJS</em> using Go instead.</p> <p>It is demonstrable to any non-technical business stakeholder that the cost savings are significant, and will save far more money, when we start to scale up, than sticking with the original implementation. We are also able to show that lower processor overheads will cascade as less infrastucture is needed, and so less cooling will be required.</p></pre>NeedsMoreTests: <pre><p>Cool, thanks for the explanation! I figured that&#39;s the direction you were heading but I&#39;ve been surprised before haha. </p></pre>Hunterbunter: <pre><p>third option is:</p> <ul> <li>they&#39;re replacing all of their video streaming components from another language, to go, because go is cloud friendly</li> </ul></pre>MrPhatBob: <pre><p>We&#39;re not going specifically serverless, but we are using Docker swarm as Go works really nicely in containers.</p></pre>NeedsMoreTests: <pre><p>Was swarm something you already using or something you decided to use over kubernetes? Seems like if you&#39;re cloud based you could go with GKE/EKS(when it lands), k8s overall is more flexible and you wouldn&#39;t have to run it yourself.</p></pre>MrPhatBob: <pre><p>Swarm was chosen because we need the option to deploy on customer&#39;s servers, as many have their own data centres, and others just plain don&#39;t trust the cloud.</p> <p>Our DevOps uses both Kubernetes and Docker and suggested that the installation overheads in our case would be rather high using Kube.</p></pre>TheRealLukeSkywalker: <pre><p>.mn </p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

930 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传