TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Replacing Ruby on Rails Part 2 – Amazing Tooling

7 点作者 zgryw大约 10 年前

1 comment

jpgvm大约 10 年前
I don&#x27;t see how Go makes a good replacement for Rails.<p>It&#x27;s insufficiently high-level IMO.<p>I would consider C# and it&#x27;s ASP.NET a good replacement. Or Scala&#x27;s Play, or Java&#x27;s Spring. But probably not anything implemented in Go.<p>There are good reasons for this. Go lacks generics and has to use reflection as a crutch to match Rails for flexibility.<p>C# ASP.NET MVC on the other hand I think is probably the best match, in fact I think it actually might be superior to Rails in many ways.<p>Namely, like Go it is statically typed. However unlike Go it has powerful polymorphic capabilities in the form of interfaces and generics. Go can only have generic data structures built into the language, they can not be built as libraries. C# however has all of it&#x27;s collections implemented as library code (though they may be in the std lib like System.Collections).<p>One might argue Go has great concurrency support, however C# has just as good concurrency support if not better. C# supports async&#x2F;await, Task based concurrency, native threads, various thread pool implementations etc. It&#x27;s primary web framework ASP.NET MVC is fully concurrency aware and uses a M:N request to thread model making use of async IO.<p>The tooling is even better than Go, Visual Studio and Resharper might cost money but they are worth what they cost. Gofmt is great, but VS&#x2F;Resharper can automatically format C# code. VS can also connect to running processes and interactively debug them, even remotely. There are tools for decompiling and working with the bytecode format (MSIL). There are great profilers and monitoring systems that run on the runtime (AppDynamics is great).<p>Most of this is true of the Java runtime and Spring&#x2F;Play also. I am just less familiar with them.<p>The point is Go is not great for this in it&#x27;s current form, there are better alternatives.