Hacker News new | ask | show | jobs
Ask HN: Golang or .Net? if you were about to build back end for your startup
8 points by pixiez 3960 days ago
I know golang is getting a lot of hype (with nice features) and it is growing fast but I fear the pros of using golang in a startup might be as obvious as using a much more mature languages like c# in a well supported .net framework and azure eco-system? in particular (I assume) it is much easier to find .Net developers when you need to grow the team?

if we can, lets please assume we know c# as well as golang (and other languages will not be considered). thanks

5 comments

"and other languages will not be considered"

That's too bad, as I'd recommend Java and/or the raft of excellent languages available on the JVM.

With C# you're effectively locking yourselves into Windows, which seems a terrible decision from both a cost and scalability standpoint.

With golang you're losing the vast array of open source packages available for the JVM, as well as locking yourselves into a single language which may or may not fit your future needs well.

Scala in particular is an interesting JVM language. Clojure and many others are worth a look as well.

>With C# you're effectively locking yourselves into Windows

Haven't you read the news recently? C# MVC6 (ASP.NET 5) which is to be released in couple of months is running on Mono and Roslyn is already used by Mono.

C# runs perfectly fine on Linux and Mac.

This. I was going to mention Java and other JVM languages.

About the Windows only thing, though: The mono project is excellent for compiling and running C#/.NET on other OSes. We use it on CentOS without much trouble.

I'm aware of Mono, but it's essentially a second-tier implementation. .Net on Windows, and the JVM on Windows/Linux/Mac enjoy support from large organizations with lots of resources. How promptly will Mono security holes get fixed for instance? How much scrutiny is there for them in the first place?

Also, the JVM beats the CLR for most benchmarks I've seen, especially real-world benchmarks. Perhaps with Microsoft open-sourcing the CLR runtime, Mono is as competitive under Linux now. That said, the JVM has scaled onto massive systems - I'm skeptical that Mono has similar capability.

> which seems a terrible decision from both a cost and scalability standpoint.

Hasn't seemed to have hurt Stack Overflow.

If it is really only a choice between those two, I'd go with C#/.NET for a number of reasons. The main thing for me is that it is object-oriented. To head off a possible complaint about .NET, with the mono project, you don't have to run your code on Windows. That leaves a lot of options open. We run a rather complex .NET application on CentOS using mono without any isssues. One thing to keep in mind, though, is that most newer programmers don't learn C#. You may be able to find people easily that are good with it, but they are likely to be older and more expensive. This may not actually be a downside if you are looking for experience, but I find that older .NET devs tend to be in the 1 year of experience 30 times group rather than the 30 years of actual experience group. This is solely based on my personal experience, though.
I expect we dont need too many senior dev - thats why I want to have an environment that junior dev can pick up quickly. is there any reason you want to run c# on linux instead of windows? is it mainly cost of software or the limitation of SQL server/IIS and etc?
I think he's preempting the Windows lock-in argument -- lots of people (including myself) are afraid to start projects using the MS tech stack because it's not portable and doesn't play well with non-MS tech stacks. Mono is a solution that allows you to run your MS code on the unix-like stacks.
I am a c# developer of many years, and I know just a little of what GO is about.

I would say it depends what you are trying to achieve.

If it is a regular old web application then .NET will shine, giving you the MVC5 framework which is similar to rails, excellent database mapping, a well integrated web server, authentication and other web concerns out of the box, integration of odata. Let alone the strong typing and excellent generics which is probably the best of the C++esque languages (but its no Hindley Milner but that isn't of much practical importance for a startup).

Maybe use GO if you need it to run cross platform, need to do some insane performance tuning or heavy systems programming. I.e. you are starting a digital ocean or something like that.

Running .NET on linux is possible but may be more limiting. So you are probably running on Windows and the server costs could be higher BUT more than paid off by saved developer costs.

Of course you are also free to use both GO and .NET, using GO where it shines and .NET for the rest of the more prosaic businessey stuff.

On hiring - you will find more .NET devs for sure. Also .NET has been around a lot longer, C# is always getting great new features and there is the excellent F# if you need to do functional programming.

Your biggest consideration as a startup is rapid development and time to market. .NET will get you there faster. Click a button and you have a boostrap-designed, authentication enabled application with a DB back end in a few seconds that you can easily extend. You can get an MVP out in a few hours in .NET.

Without knowing more about your application, I would say it is 99% likely .NET would be a better choice.

I'd base it on the language and infrastructure/OS I/my team knew best. The worst thing for an early startup to do is to try and figure out new languages or tools when it isn't absolutely necessary. You have enough hard work to solve the business problem, so pick what you are familiar with.

Also, in the end, you will likely change your structure more than once from the first MVP, so I would just make a decision and move forward fast.

As for my opinion. C# is still primarily a Windows environment solution (although its getting better), Golang is a little bit more agnostic but I wouldn't use it anywhere but in a linux environment. My choice would be golang if those were my only two options, mostly because I feel the ecosystem, scaling and cost is better not to be in the Microsoft environment for a startup. However, if you are planning for a Windows based environment, then nothing beats C# IMO.

There are completely valid options that are neither of these languages, nodejs, python or some JVM based languages. I generally avoid the JVM, but that is a personal preference based on my experiences and I recognize plenty of amazing systems are built on JVM based languages all the time.

I agree we should go with something we are already familiar with but I come from c++ background and I dont think it is the best language/ecosystem for a team that only have 1 developer. I am a senior developer (c++ as I mentioned) so I think it is not an issue for me to pick up a new language but it is more an issue with finding/training new developer when we need to - I agree senior experienced developer is generally more expensive (or too expensive for early stage startup), so hiring a couple of junior dev sound more efficient but I cannot afford spending months to train them to help them to be helpful, and I feel it is easier to be productive in a .Net environment as Visual Studio is just easy for anyone to pickup.

we have some cost efficient way to get license on Microsoft's software like Windows/SQL Server so the cost on software is not an issue, so is there any other concern with Windows-based solution? you mentioned scalability, why this can be an concern? (I assume windows should be able to do whatever linux is able to provide?)

Given this, I'd go with the C#.NET route than, as your knowledge of C++ makes C# the natural choice and finding .NET devs is not usually too difficult.

My comment on scalability and Windows is mostly based upon cost as well as most distributed software solutions that are designed to scale are primarily done not on Windows Server but on Linux of some flavor. I am also biased here as I started my career in Unix, although I spent ~8 years doing primarily Microsoft development, and am dedicated to non-microsoft environments now. In some cases when clients have demanded we deploy on Windows some of the software vendors would tell us to significantly increase the number of nodes when running on Microsoft as they found their failure rates were higher, not to mention less resource efficient. Hence cost goes up more and maintenance increases as well. And no, I wouldn't necessarily say Windows is as capable as Linux, but that may just be some bias sneaking in.

That's because your running unix/Linux software ported to windows.

If you use windows first tools(IIS, MSSQL), windows is a high performer.

I agree some but not totally. For example, I only run IIS as a web server for Windows as so far nothing else does nearly as well as it does on Windows IMO (I use nginx on Linux). As well MSSQL is the goto database on Windows. MSSql is pretty damn nice too although scaling and licensing is very expensive not to mention the hardware you need to run it.

But when you get into distributed software solutions which is mainly what I am working on, it is hard to get the same scalability and functionality out of Windows and Windows native products. For example, a decent messaging system like RabbitMQ either has numerous Windows specific quirks or just won't scale the same requiring more servers to maintain throughput and reliability. Not that it can't be done though, just it really changes the cost factor and the architecture. I can even use SQL Server Broker which is pretty good but again, now the costs go up pretty significantly both in terms of hardware and licensing as you can't just run it on a bunch of commodity/virtual servers full or Ram.

I made a great living off Uncle Bill and the entire Microsoft ecosystem, and I am not a Windows hater (I really like C#), I just recognize for most solutions of scale it doesn't work out without significant cost and tradeoffs.

I actually run a distrubted website using NServiceBus. I don't really have a problem.
also, I have the same bias - to avoid any JVM base - as well, I dont know why I have this preference, might to do with my bad impression (slow) with Java back in the 90s. do you have any concrete reason to avoid JVM ?
I did a bunch of Java work in the 90's and early 2000's, and I converted multiple Java solutions to .NET over the years. We even were using Java in 1998/99 at a pretty large scale (big 3 auto maker work) and trying to make it work on Windows Server (ouch).

IMO, Java and the JVM haven't kept up with the pace of change in managed languages/environments. Frankly when .NET was released it was worse than Java and the JVM by far but that is one place Microsoft didn't miss the train and they really turned .NET into a power house. Not saying .NET is perfect, but performance issues, predictability, overhead etc all seem superior to me over the JVM. So in general I avoid writing my own code based upon a JVM centered language as I just don't feel it is nearly as resource efficient or stable. I'll say that the JVM is quite tunable to help mitigate a lot of my complaints but the complexity to do it right exceeds the benefits to me when other languages can do what I want without that extra step needed.

I will say though, that I rely on products that are JVM based and I am open to learning some of the newer languages that also depend on the JVM.

FWIW as well, my core language is C++, has been for my entire career. I still use C/C++ but most code I write is node.js with some growing golang mixed in replacing some of the C++ components we have.

One thing to keep in mind: if you're building a startup in .NET, you have access to BizSpark (and Azure credits), which, at least for me, has been an amazing help as it removes the friction, hassle and stress of licensing and the monthly cloud expenses. There's even a bigger BizSpark offering which was around on HN some months ago.

https://www.microsoft.com/bizspark/

OTOH Azure is (was?) one of the most expensive providers, so after you outgrow BizSpark it might not make financial sense any more (though if you have paying customers, it will probably not be a significant expense :) and they're betting on it I guess).

I never considered another choice because I come from Microsoft shops (I tried Groovy/Grails and other stuff, but didn't find a reason to switch). I'm extremely happy with my choice so far, I love the IDE and the ease of use, I'm very comfortable with MSSQL, etc...